Accessibility · Senior · Question 5 of 75

A modal sets aria-hidden="true" on #app, but focus is still inside #app. What happens?

Show the answer

Correct answer: Focus lands in hidden content; Chrome may even block the attribute

Explanation

Move focus first. Chrome warns and ignores aria-hidden when a descendant holds focus. Prefer inert, which removes focus as well.

Further reading

Problem with a question

Accessibility · Senior · question 5

Test yourself

Take the Accessibility · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz