A
A
Alexander Veselov2016-10-01 16:28:34
Bootstrap
Alexander Veselov, 2016-10-01 16:28:34

What is "role-dialog" and "labelledby"?

Straight from the docs,
Don't send to google, I know what google translate is, so :
Make modals accessible
Be sure to add role="dialog" and aria-labelledby="...", referencing the modal title, to .modal, and role="document" to the .modal-dialog itself.
Additionally, you may give a description of your modal dialog with aria-describedby on .modal.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ketov, 2016-10-22
@yaxromo5oma

Actually, role is an attribute that adds semantics to an element. What is it - you can read here .
Browsers that already recognize this semantics will perceive your layout better, evaluating which block is responsible for what (dialog, button, header, footer), and therefore it is better to parse it.
It turns out that in your case the browser will understand that this piece of html that is not displayed on the page is a dialog, but, for example, not a hidden piece for promotion in a search engine (this used to be).
The second attribute can be found here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question