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.
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
Website: Adds a11y audit in acceptance tests #1089
Website: Adds a11y audit in acceptance tests #1089
Changes from 21 commits
c57a317
0141ceb
a33065c
75634d9
33fa416
67de6fa
4410962
77a1afa
92697f1
dc2dbfe
325695d
278d9bf
be959b3
3518daa
71ade97
e8f4439
68907f9
03d1099
2a9d2c2
f35f55e
46efb1c
53a146c
6c9e93e
f357159
479deaf
8cfee29
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Apart from passing the tests, what is the benefit of doing this? I don't think we can have an expectation that all the code snippets (rendered as components), for every possible component, now and in the future, in every possible context, will pass all the accessibility criteria.
The downside of this is that when the consumers will copy this code snippet (or other code snippets in other pages for other components) they will copy code that may not be suitable for their context, or even incorrect.
I am totally OK to make the HDS components as much accessible as we can (eg. if the
aria-label
is required for theBreadcrumb
let's add a property for that) but I want to have a discussion, as a team, and evaluate pros and cons, of making also all the code snippets for the HDS components in the Helios documentation also pass all the accessibility tests.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 would ask you to consider this: We expect our examples to work, we expect our CSS and JavaScript to be correct, why would Accessibility be any different?
I hope you will re-consider your point of view.
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.
When consumers copy and paste the code snippet into their project, do we expect them to keep the
aria-label
, or is this something they would likely remove?If it's something they'll remove, is there a way to attach the
aria-label
to the code snippet block (container) instead of directly in the component itself?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.
@didoo In order to unblock this PR, I can commit to a follow-up PR that explores potential alternative approaches that achieve the same outcome.
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.
@heatherlarsen @KristinLBradley there's already an
aria-label
on the component itself (default isaria-label="breadcrumb"
) so that would take precedence (here on the docs website)To answer the first question: any application that uses internationalized strings would change the content-
so
aria-label="breadcrumb"
would be edited to bearia-label={{t "breadcrumb"}}
But this goes for anything that has a string value like
@text
etc. Pretty much everything they copy and paste already has to be heavily edited, since they are superficial examples and not specific to a product. We put the args/props and values there to demonstrate how it is done, and they copy/paste and edit to match their own use case.