teamforus / forus

Online platform voor maatschappelijke projecten.
https://forus.io
GNU Affero General Public License v3.0
9 stars 3 forks source link

WCAG: close popup modals should be possible with keyboard #2240

Closed jamalv closed 3 years ago

jamalv commented 3 years ago

The button to close a popup is made from a non-interactive div element.

The reading software cannot tell its user that these are buttons because they miss the correct role. Now these buttons are coded as neutral (non-interactive) div elements. In addition, the reading software does not know what the function (name) of these buttons is.

The most robust solution is to use the native HTML elements such as button elements. Another possible solution is to use WAI-ARIA.

image.png

jamalv commented 3 years ago

should be able to close all modals using the "escape" key