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

Adds accessibility notes to breadcrumbs #23684

Merged
merged 1 commit into from
Sep 1, 2017

Conversation

andresgalante
Copy link
Collaborator

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?

@@ -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
Copy link
Member

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?


## 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.
Copy link
Member

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?

Copy link
Collaborator Author

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


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).
Copy link
Member

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.

@andresgalante
Copy link
Collaborator Author

Hi @mdo
I've reduce the accessibility text, removed the non accessible code snippets and replaced them for the recommended W3C design pattern.

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?

Copy link
Member

@patrickhlauke patrickhlauke left a 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 👍


## 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.
Copy link
Member

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".

@andresgalante
Copy link
Collaborator Author

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?




More information on [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#breadcrumb).
Copy link
Member

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)

Copy link
Collaborator Author

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

@andresgalante
Copy link
Collaborator Author

Hi @patrickhlauke the change is done, let me know if I am missing anything else,
thanks a lot for taking the time to review this one.

@patrickhlauke
Copy link
Member

All good for me, thanks :)

@Johann-S Johann-S merged commit c7d9762 into twbs:v4-dev Sep 1, 2017
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.

5 participants