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

aria details vs aria describedby fixed for text field #2352

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

tshimber
Copy link
Contributor

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.

Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 52e6421
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/66ebef703b1bff0008bb96f6
😎 Deploy Preview https://deploy-preview-2352--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tshimber
Copy link
Contributor Author

@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 : {})}
Copy link
Collaborator

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

Copy link
Contributor Author

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
image

Copy link
Contributor Author

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

Copy link
Collaborator

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

@amir-ba amir-ba merged commit 2706542 into telekom:main Sep 19, 2024
12 checks passed
amir-ba added a commit that referenced this pull request Sep 19, 2024
* 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]>
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

Successfully merging this pull request may close these issues.

Usage of "aria-detailed-id"
2 participants