How to keep focus within modal dialog?

Edit February 1, 2024: The inert attribute is now fully stable and can be used to prevent a user escaping a modal by making everything outside the modal inert. Additionally, you can use the dialog element with the showModal function to handle modal dialog focus automatically. Using showModal will open the dialog element as a … Read more

What is the difference between aria-owns and aria-controls

Both aria-controls and aria-owns are used when the relation between the two element can’t be determined from the DOM hierarchy itself. aria-controls is intended to indicate that an element controls another one. E.g. control buttons for a video for instance, a toolbar for a visual editor or a button for a collapsible element. Screen readers … Read more

How to label a loading animation for WAI-ARIA?

The best solution I could come up with was using role alert, and aria-busy=”true”. <div id=”loading” style=”display: none;”> <div class=”mgBot15″><span class=”txt16″ role=”alert” aria-busy=”true”>Working…</span></div> <img src=”https://stackoverflow.com/questions/38704467/loading.png” alt=”loading” /> </div>

When to use the required attribute vs the aria-required attribute for input elements?

When John Foliot wrote that article in 2012 it was very much true. You needed both. Today that is no longer the case. I can take your example, put it in a CodePen, and check it in JAWS and NVDA (sorry, no VoiceOver today): <label for=”textbox1″>Input</label> <input id=”textbox1″ type=”text” name=”Text Box” required> You will be … Read more

What is a WAI-ARIA compliant implementation for navigation bar/menu

A possible implementation would be: HTML structure: <div> <!– Outer wrapper –> <ul> <!– Main navigation bar container –> <li> <!– First-level item without submenu –> <a> <!– Destination URL –> </a> </li> <li> <!– First-level item with submenu –> <a> <!– Destination URL –> </a> <ul> <!– Second-level menu container –> <li> <!– Second-level … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)