omeka / Omeka

A flexible web publishing platform for the display of library, museum and scholarly collections, archives and exhibitions.
http://omeka.org
GNU General Public License v3.0
472 stars 193 forks source link

Make required fields screen reader friendly #1029

Open kimisgold opened 1 week ago

kimisgold commented 1 week ago

In some places where we use required fields, like the login and installation views, we use CSS to add an asterisk as a pseudo element. Screen readers cannot access this information, and users only find out a field is required if it does not validate.

We could maybe create some kind of view helper to add to the field decorators. Something to generate markup like <span class="required sr-only" title="(Required)">(Required)</span>. We could style it so that the full text is only viewable to screen readers, keep the asterisk, but also provide a tooltip with the text when hovering over it.