-
Notifications
You must be signed in to change notification settings - Fork 82
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
aria details vs aria describedby fixed for text field #2352
Conversation
✅ Deploy Preview for marvelous-moxie-a6e2fe ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@amir-ba i've also changed naming for existing prop from aria-detailED-id to aria-details-id, 'cause i don't get why make different name, it's misleading. but how we handle backward compatibility? should we keep previous one as well for a while and mark it as deprecated? |
{...(this.helperText || this.ariaDetailedId | ||
? ariaDescribedByAttr | ||
: {})} | ||
{...(this.helperText && this.ariaDetailedId ? ariaDetailsAttr : {})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a duplicate. One of the ternary operates should be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amir-ba I've done by analogy: each {} block for one property. they both can be set up to conditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i mean ternary would be good if it was either ariaDescribedBy or ariaDetails up to conditions. but it can be none, one or both of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see , then lets keep it as is
* ci: sets up docker compose alias for compatibility (#2342) * fix: dropdown scroll fixed (#2333) * chip accessibility fix (#2332) * feat: chip keyboard handling fixed * feat: chip html added * fix: snapshot updated * fix: focus issues fixed * fix: readme fix * checkbox and switch css fixes for high contrast mode (#2317) fix: checkbox and switch CSS fixes for high contrast mode * ghost btn in storybook (#2341) * fix: ghost btn in storybook fixed * fix: one more ghost fixed * event part in storybook fixed (#2345) * fix: event part in storybook fixed * fix: german versions fixed * aria details vs aria describedby fixed for text field (#2352) * refactor: aria details vs aria describedby fixed for text field * fix: reverted to ariaDetailedId + description added to storybook * chore(release): publish (#2354) * chore(release): publish --------- Co-authored-by: tshimber <[email protected]>
Fixes #2349
Accessibility fix for text field. In normal case helper text is provided and its id is being set as aria-describedby. Extra details can be provided in aria-details-id, it is being set as aria-details. But for cases when developers dont wanna use helperText for some reason and provide important info with aria-details-id, we set it as aria-describedby, 'cause its more convenient/accessible for final user.