The :target-based modal works just fine for non-screen-readers using only CSS and HTML.
With JS enabled, it works fine for people like me, who cannot use a mouse.
But for screen-readers, with inline links, the behaviour can be unexpected.
I need to know how screen-readers normally announce inline links, using fragment identifiers - I'll look into that.
Because, could it potentially be enough to set aria-hidden="true" on the modal by default, and change this to false on the hashchange-event?
And set the aria-label to "Back to previous loccation"?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Again, thank you for your comprehensive answer!
To recap:
:target-based modal works just fine for non-screen-readers using only CSS and HTML.I need to know how screen-readers normally announce inline links, using fragment identifiers - I'll look into that.
Because, could it potentially be enough to set
aria-hidden="true"on the modal by default, and change this tofalseon thehashchange-event?And set the
aria-labelto "Back to previous loccation"?