React-modal: Use dialog element

Created on 18 Aug 2016  路  3Comments  路  Source: reactjs/react-modal

Could this make use of the dialog element for greater accessibility?

http://www.w3schools.com/tags/tag_dialog.asp

All 3 comments

@gavmck It would be nice, but it seems to be implemented in a few browsers...
There is an attribute role=dialog, maybe it can be useful for now.

Sources:
MDN - Dialog
caniuse.com/dialog

Yes, you should be putting role="dialog" on the modal element. That will assist screen readers by letting them understand the semantic role of the element in the app.

Nice!

Was this page helpful?
0 / 5 - 0 ratings