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

Disabled pagination links should not be focusable #848

Closed
bobbylight opened this issue Feb 18, 2014 · 2 comments
Closed

Disabled pagination links should not be focusable #848

bobbylight opened this issue Feb 18, 2014 · 2 comments

Comments

@bobbylight
Copy link

For accessibility reasons, disabled links (spans) in the pagination footer should not be focusable, either via clicking with the mouse or tabbing to them. The "1-10 of 100 results" region shouldn't be focusable either. It seems this can be fixed simply by not setting tabIndex on these spans.

While there's surely a better workaround, I can "fix" grids with the following JS:

GridUtils.fixA11yBugs = function(grid) {

   // Make the "x-y of z results" text non-focusable
   query('.dgrid-status', grid.domNode).forEach(function(elem) {
      elem.removeAttribute('tabindex');
   });

   // Make disabled pagination links non-focusable
   aspect.after(grid, '_updateNavigation', function() {
      var disabledNavSpans = query('.dgrid-page-disabled', grid.domNode);
      disabledNavSpans.forEach(function(elem) {
         elem.removeAttribute('tabindex');
      });
   });

};
@bobbylight
Copy link
Author

Note that the .dgrid-status section might be focusable specifically for screen readers - so the user is read what region of the results they're looking at. So that one arguably shouldn't be fixed (I'm no expert in this area, not sure). But the disabled pagination links I believe shouldn't be focusable.

@kfranqueiro
Copy link
Member

Yes, the status node was specifically made focusable so that keyboard navigation could land on it and it could be read by screen readers.

I think you've got a fair point with the disabled paging controls though, judging by how disabled buttons work, for example.

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

Successfully merging a pull request may close this issue.

2 participants