-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added ariaHidden to exampleLineCharts #789
Open
halimahLDN
wants to merge
36
commits into
exampleLineCharts
Choose a base branch
from
exampleLineCharts-accessibility
base: exampleLineCharts
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
halimahLDN
changed the title
Example line charts accessibility
Added ariaHidden to exampleLineCharts
Jan 16, 2025
…r reference by aria-describedby
…rtContainer and Footer for display in modal, correcting emissions to equivalent
…e with other text elements
I've now implemented I've now:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
Originally
I've added
ariaLabel
andariaHidden
attributes to the example line chart, to demonstrate how we can incorporate accessibility best practice.I don't think this is quite perfect due to the following:
ariaDescription
doesn’t appear to work inside marks or the spec - the screen reader ignores itariaLabel
on thePlot.line()
makes the line disappearariaLabel
on the spec (outside of marks) DOES work but the screen reader still reads the y axis label, as it's not hiddenariaLabel
isn't achieving much more than the subTitle is, so we could instead replace it with a slightly more descriptive subTitle and hide the chart (though how to hide the chart remains to be seen, given the above re axis labels)Now
I've instead added an optional prop
ariaHidden
toObservablePlotInner
which defaults to true, hiding the chart contents. I've removed the individual ARIA attributes in the exampleLineChart marks and updated the title and subtitle to be more descriptive.I've since also added
ariaDetails
andariaDescribedBy
props which default to empty strings. So more detailed descriptions of the chart contents can be shared.Related issues: #762
Is it complete?