bootstrap-ruby / will_paginate-bootstrap

Integrates the Twitter Bootstrap pagination component with will_paginate
MIT License
388 stars 160 forks source link

Supporting Screen Readers #31

Open Ariel-Thomas opened 10 years ago

Ariel-Thomas commented 10 years ago

Currently, from a screen reader perspective, the pages are not obviously labeled as such. Bootstrap 3.0 provides the 'sr-only' class to allow bits of html to only be shown to screen readers. The pages should really have a span which includes "Page " in front of them to make things easier on screen readers. The result for a screen reader list of links goes from "1", "2", "3 to "Page 1" "Page 2", "Page 3".

I used your existing renderer code for rails and made this addition and it seems to work fine. Perhaps in the gem this should be the default behavior with a will_paginate option to disable it?

I can do a pull request with the changes, if needed.

acrogenesis commented 10 years ago

:+1: