Skip to content

FullscreenModal

What component has

Keyboard support

Keyboard support
KeyFunction
TabMoves focus to the next focusable element.
Shift + TabMoves focus to the previous focusable element.
EscCloses the modal window.
  • See detailed information about the keyboard support for the all buttons, input, etc., in the Keyboard control guide.
  • Don't forget to check recommendations on accessibility for Form.

Roles & attributes

The list below describes roles and attributes that component already has.

Roles & attributes
ComponentAttributeUsage
FullscreenModalrole="dialog"Identifies the element as a dialog, indicating to assistive technology that its content is grouped and separated from the rest of the page content.
Gets this role from Modal.
FullscreenModalaria-modal="true"Tells assistive technologies that the content underneath the current dialog isn't available for interaction.
Gets this attribute from Modal.
FullscreenModalaria-labelledby="IDREF"Gives the dialog an accessible name by referring to the content of FullscreenModal.Title.
FullscreenModalaria-describedby="IDREF"Gives the dialog an accessible description by referring to the content of FullscreenModal.Description.
FullscreenModal.Closearia-label="Close"Sets an accessible name for the button that closes the dialog.
FullscreenModal.SectionImplemented using HTML <section> to serve as a region landmark. Note that you should add an aria-label to provide access to the landmark.

Considerations for designers & developers

Attributes

The list below will help you to keep in mind the necessary attributes to make our components fully accessible in the particular cases in your interfaces.

Attributes
ComponentAttributeUsage
FullscreenModal.Sectionaria-labelSet an accessible name for the section so that it can be used as a landmark.

Main heading

By default, FullscreenModal.Title in our Modal component is marked as h2. Since there is no strict WCAG recommendation on this, we've made this decision for the following reason: Modal windows are usually part of the page and don't have a separate URL, so to keep consistency within the page, it's recommended to have only one h1 tag on the page. Having more than one h1 tag per page can confuse users of assistive technology.

However, if your modal window has a separate URL, you can mark FullscreenModal.Title as h1.

Nested headings

Make sure that headings inside the FullscreenModal follow the overall heading hierarchy. For example, if the FullscreenModal.Title is marked as h2, then the following heading inside the modal should be marked as h3, and so on.

Resources

W3 modal dialog example has detailed information about the modal window accessible behavior.

Other recommendations

See more accessibility recommendations in the common Accessibility guide.

Released under the MIT License.

Released under the MIT License.