ubyssey / ubyssey.ca

The code that powers www.ubyssey.ca
GNU General Public License v2.0
35 stars 40 forks source link

The modal stuff I set up is bad for accessibility instead of good #1487

Closed SamuelmdLow closed 3 weeks ago

SamuelmdLow commented 3 weeks ago

I added a script to main.js that generically manages modals and part of that script involved moving the modal elements inside a div outside of the content-wrapper div. I thought this was a good idea because then I could set the content-wrapper to aria hidden. But its actually a bad idea because it ruins tabbing. When the modal disappears the user's tab position gets reset to the beginning of the page which sucks. So this should be changed

SamuelmdLow commented 3 weeks ago

Reference this

https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/dialog/

SamuelmdLow commented 3 weeks ago

I'll make this change in https://github.com/ubyssey/ubyssey.ca/tree/1475-image-click-to-enlarge