-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(pagination): Added aria label input for accessibility #1294
Conversation
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.
Hey. Two things:
-
I would not add
ariaLabel
on ALL demos, maybe only one likepagination-config
or a proper accessibility demo. They are supposed to be simple and to the point. -
Maybe I'm talking nonsense, but can't we simply stick
[attr.aria-label]
on the host element by the way, not on the inner<nav>
. They won't read it properly?
src/pagination/pagination-config.ts
Outdated
@@ -15,4 +15,5 @@ export class NgbPaginationConfig { | |||
pageSize = 10; | |||
rotate = false; | |||
size: 'sm' | 'lg'; | |||
ariaLabel: string = 'Page navigation'; |
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.
no need in :string
type
e0d025d
to
63bc0ad
Compare
Thanks for the review!
(Don't know why the travis build is failing though 🙁 ...) |
@maxokorokov has a point and tbh I would go even a step further - if we would to simply forward a proerty binding to an attribute on a host... why do we need to do things at all? I mean, why not show people to simply use Could we test it with screen readers and check of we need to do anything here at all? |
I've just checked with ChromeVox and it seems like sticking Other thing: this PR doesn't add |
@thbt could you please add support for the You might also find this article useful: http://www.a11ymatters.com/pattern/pagination/ |
LGTM. Let's wait for the TravisCI build and if it is green I'm going to merge this one. Thnx! |
Remove the `nav` element and add the `role="navigation"` attribute to the host. `aria-label` is not needed anymore as it can be put on the host. Add invisible `(current)` text for screen readers.
Before submitting a pull request, please make sure you have at least performed the following: