-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Adds accessibility notes to breadcrumbs #23684
Conversation
774d72d
to
70aa414
Compare
docs/4.0/components/breadcrumb.md
Outdated
@@ -32,3 +32,22 @@ Similar to our navigation components, breadcrumbs work fine with or without the | |||
<span class="breadcrumb-item active">Bootstrap</span> | |||
</nav> | |||
{% endexample %} | |||
|
|||
|
|||
## Regarding accessibility |
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 would be the only heading on the page; can we change it to ## Accessibility
for brevity? And then also add an ## Overview
or ## Example
above line 8?
docs/4.0/components/breadcrumb.md
Outdated
|
||
## Regarding accessibility | ||
|
||
If you’re using breadcrumbs to provide a navigation, be sure to add a `aria-label="breadcrumb"` to describe the type of navigation provided in the `<nav>` element. |
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.
Should we be doing this in our examples?
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 think that if we can deliver accessible snippets from bootstrap we will be doing a huge dent to help people with disabilities.
So even though the other examples will render correctly, I think we should deliver just one example that follows an accessible pattern.
I'll change this PR and send a new option
docs/4.0/components/breadcrumb.md
Outdated
|
||
Also apply an `aria-current="page"` to the last `<a>` of the set to indicate that it represents the current page. | ||
|
||
More information on [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#breadcrumb). |
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.
Feel like the above three lines should be a single paragraph vs three separate lines.
70aa414
to
f0f8b85
Compare
Hi @mdo As I wrote on the comment above, I think that the more accessibility we can deliver built into bootstrap components the better the web will be. What do you think? |
f0f8b85
to
f5c0d58
Compare
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.
Barring the slight rewording I suggested, this looks good to me 👍
docs/4.0/components/breadcrumb.md
Outdated
|
||
## Accessibility | ||
|
||
Since breadcrumbs provide a navigation, be sure to add a `aria-label="breadcrumb"` to describe the type of navigation provided in the `<nav>` element. Also apply an `aria-current="page"` to the last item of the set to indicate that it represents the current page. |
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'd soften the language from "be sure to add" to something more like "it's a good idea to add". As it's up to the author to assign a label (i.e. "breadcrumb" isn't a mandated value, just a suggestion), I'd further change it to something like "it's a good idea to add a meaningful label such as aria-label="Breadcrumb"
.
f5c0d58
to
f797b77
Compare
Hey @patrickhlauke, that makes a lot of sense, thanks for the review. I've also changed the second phrase. Can you please take another look at it? |
docs/4.0/components/breadcrumb.md
Outdated
|
||
|
||
|
||
More information on [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#breadcrumb). |
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.
sorry, one final change request (missed it first time around): possibly reword to "For more information, see the WAI-ARIA Authoring Practices for the breadcrumb pattern." (and maybe remove two of the preceding line breaks, to keep it nice and tight)
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.
@patrickhlauke Nothing to be sorry about, I'll update it now. I am not an english native speaker, so any help on wording is always welcome. I'll update the PR now
f797b77
to
a32e7b7
Compare
Hi @patrickhlauke the change is done, let me know if I am missing anything else, |
a32e7b7
to
346f60c
Compare
All good for me, thanks :) |
This PR adds accessibility remarks on breadcrumbs following WAI-ARIA design pattern:
https://www.w3.org/TR/wai-aria-practices/examples/breadcrumb/index.html
What do you think?