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

Add aria-label to page length select for accessibility #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Banner-Keith
Copy link

I have added an aria-label attribute to the length select menu. I tried to follow the pattern I had seen on the sort element aria code using oAria settings.

I ended up running the make file build scripts and during that I found that create_function was removed from the newest major version of PHP. I have switched over to an anonymous function. It didn't seem to cause any issues on my end but if you'd prefer that I remove that part from this PR I would be more than happy to do so.

I also noticed that the build script would always print out that you were building master even if that wasn't true, so I tweaked it to show the current branch so it's not confusing. Once again, I can remove that if you prefer.

I have built and copied the output into a working site on one of my active internal projects and it worked great with no defects that I have noticed.

Please let me know if there's anything you'd like me to tweak.

This is a very minor change so I'm hoping it can go out before version 2.0 if you decide to publish another version.

@AllanJard
Copy link
Contributor

Hi - thanks for this! All development for DataTables is currently happening on the 2 branch - the master is currently only getting bug fixes and I think this would probably qualify as a new feature.

With 2 I've changed the page length control a little bit to try and improve accessibility - the select is now outside of the label and an explicit binding is used. It seems that a lot of screenreaders didn't like the previous implicit binding. The wording as changes a little to reflect this as well. You can see a WIP example here: http://datatables.net/dev/2/examples/basic_init/zero_configuration.html .

Would you say that still needs an aria-label on it?

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 this pull request may close these issues.

2 participants