Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InjectIntl HOC wrap and passing of ClassName to all components that have title/placeholder attributes #379

Closed
7ruth opened this issue Oct 25, 2018 · 2 comments

Comments

@7ruth
Copy link
Contributor

7ruth commented Oct 25, 2018

Components:

FieldInput
ErrorCard
Checkbox
Button
etc.

Describe the new component

  • All existing components that need placeholder and/or title (or other attributes, such as aria-attributes) for complete accessibility purposes should allow the final user of the component to pass in intl message object as placeholder/title props without wrapping each single component in this injectIntl HOC. (Lets just do it at the source).

In what context will the pattern be used?

  • GM-ui projects utilize react-intl to enable language locale toggling. For complete accessibility compliance I often want to pass to the placeholders and titles but I can't pass in JSX component when pure HTML is expected, hence intl lib exposes the injectIntl HOC to handle those cases.

Does this pattern have state?

  • No

Progressive enhancement

How does this pattern scale up?

  • This fix would eliminate the need to use injectIntl wrap in all child projects that use react intl prioritize accessibility completeness

How will this pattern degrade in older browsers?

  • All constituents of this issue should work fine in older supported browsers

Does the new component raise any accessibility concerns?

  • It closes accessibility gaps by extending language locale toggling capabilities over them.

One concert is that this might throw off testing in projects that currently leverage these components since you would need to use mountWithIntl instead of mount (etc.) in your testing.

@7ruth
Copy link
Contributor Author

7ruth commented Oct 25, 2018

@tilleryd
Copy link
Contributor

tilleryd commented Jan 4, 2021

Will not address this at this time but will target it as a feature the component library we use as the new base going forward.

@tilleryd tilleryd closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants