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

[Pagination] Documentation suggests invalid HTML role="navigation" #9334

Closed
TimMoore opened this issue Nov 6, 2016 · 0 comments
Closed

[Pagination] Documentation suggests invalid HTML role="navigation" #9334

TimMoore opened this issue Nov 6, 2016 · 0 comments

Comments

@TimMoore
Copy link

TimMoore commented Nov 6, 2016

The documentation for Pagination includes this example:

<ul class="pagination" role="navigation" aria-label="Pagination">

with this comment:

Note that the container has the attributes role="navigation" and aria-label="Pagination". These explain the purpose of the component to assistive technologies.

I noticed my IDE warning that "navigation" is not an acceptable value for the role element in this context. At first I thought this was a bug in the IDE, but more research confirmed this:

http://stackoverflow.com/a/14181478/29470 says:

<ul> has a default implied ARIA semantic of list, and may only validly be set to either directory, list, listbox, menu, menubar, presentation, tablist, toolbar or tree, so setting it to navigation is invalid and breaks the list semantic that the <ul> element has in the first two cases.

This can be confirmed in the HTML5 spec

Maybe it would be better to suggest wrapping the <ul> in a <nav> element instead.

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

No branches or pull requests

3 participants