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

Fix: ariaScaleName added to give context of scale measurement (fixes #189) #192

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

kirsty-hames
Copy link
Contributor

Fixes #189

This will be read out by screen readers when focusing on the scale input (slider handle). Setting an appropriate ariaScaleName will give context to which the scale is a measurement of. Note, the naming will be content specific so I haven't provided a default value.

An accessible name is required for accessibility, see Mozilla ARIA slider role.
An accessible name is required. If the range's role is applied to an HTML <input> element (or <meter> or <progress> element), the accessible name can come from the associated <label>. Otherwise use aria-labelledby if a visible label is present or aria-label if a visible label is not present.

Testing PR

In component.json, set ariaScaleName for the slider component. As the scale name is content specific, I used the following based on the example.json question text.
"ariaScaleName": "limited capacity of working memory",

With a screen reader running, focus on the slider input (handle) and "scale number, ariaScaleName, slider" should be announced.
e.g "1, limited capacity of working memory, slider"

...read out by screen readers to give context to which the scale is a measurement of.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@swashbuck swashbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@joe-allen-89 joe-allen-89 merged commit c8737a1 into master Aug 11, 2023
1 check passed
@joe-allen-89 joe-allen-89 deleted the issue/189 branch August 11, 2023 22:19
github-actions bot pushed a commit that referenced this pull request Aug 11, 2023
## [4.3.9](v4.3.8...v4.3.9) (2023-08-11)

### Fix

* ariaScaleName property added (#192) ([c8737a1](c8737a1)), closes [#192](#192)
@github-actions
Copy link

🎉 This PR is included in version 4.3.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slider input has no accessible name
4 participants