HubSpot / vex

A modern dialog library which is highly configurable and easy to style. #hubspot-open-source
http://github.hubspot.com/vex/docs/welcome
MIT License
6.92k stars 493 forks source link

Added accessibility features for tabbing and aria labels #257

Open michaelvdow opened 6 years ago

michaelvdow commented 6 years ago

This pull request adds accessibility features based on the work done in #133 by converting it from CoffeeScript to vanilla JS. This prevents focus from leaving the dialog while tabbing, and hides the main content when the dialog is visible. Upon dialog close, focus is given back to element with initial focus. It also adds requested changes from #26 that change the exit button to a <button> and added aria-labels.

bbatliner commented 6 years ago

@michaelvdow: see my specific comments on the code, but otherwise very good stuff. Can you run npm run test from the project directory? This will run our linter, which will enforce a consistent style and catch some mistakes you may have made. Please fix any errors that come up on there.

bbatliner commented 6 years ago

Hey @huoxito! Someone got around to porting your accessibility PR to vanilla JS and I want you to take a look before we merge it in. Can I have your feedback/approval? :D

huoxito commented 6 years ago

nice work @michaelvdow and thanks for getting in touch @bbatliner LGTM :ship:

felixhaeberle commented 5 years ago

@bbatliner @huoxito Any updates on this? Considering implementing this in the new Drupal Admin UI Theme "Claro" if this accessibility features gets added.