- From: Bryan Garaventa <bryan.garaventa@whatsock.com>
- Date: Wed, 17 Dec 2025 11:04:20 -0800
- To: "'Norbert Zellhofer'" <nz@usability.at>, <public-aria-practices@w3.org>
- Message-ID: <018501dc6f87$f4cbfe70$de63fb50$@whatsock.com>
Hi, I understand the confusion, however the use of tabindex=”-1” is correct. The reason being, for any static element to become focusable in the browser it has to have a tabindex, otherwise the JavaScript focus method won’t work to move accessible focus to that element. Even so though, the purpose is not to make this focusable in the normal tab order, which would occur if you used tabindex=”0” or a positive number. The only purpose of this element being focusable is to temporarily move programmatic focus to that location for accessibility, and then for that element to not be focusable after that point. The only way to achieve this is to set the tabindex value to “-1”, which makes it focusable but prevents it from appearing in the normal tab order. All the best, Bryan From: Norbert Zellhofer <nz@usability.at> Sent: Monday, December 1, 2025 7:26 AM To: public-aria-practices@w3.org Subject: Tabindex description is wrong https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/ There is a wrong description. It should be "tabindex=0" NOT "tabindex=-1“ to focus a static element. [put comment here…] When a dialog opens, focus moves to an element contained in the dialog. Generally, focus is initially set on the first focusable element. However, the most appropriate focus placement will depend on the nature and size of the content. Examples include: * If the dialog content includes semantic structures, such as lists, tables, or multiple paragraphs, that need to be perceived in order to easily understand the content, i.e., if the content would be difficult to understand when announced as a single unbroken string, then it is advisable to add tabindex="-1" to a static element at the start of the content and initially focus that element. This makes it easier for assistive technology users to read the content by navigating the semantic structures. Additionally, it is advisable to omit applying aria-describedby to the dialog container in this scenario. * If content is large enough that focusing the first interactive element could cause the beginning of content to scroll out of view, it is advisable to add tabindex="-1" to a static element at the top of the dialog, such as the dialog title or first paragraph, and initially focus that element. * If a dialog contains the final step in a process that is not easily reversible, such as deleting data or completing a financial transaction, it may be advisable to set focus on the least destructive action, especially if undoing the action is difficult or impossible. The <https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/> Alert Dialog Pattern is often employed in such circumstances.
Received on Wednesday, 17 December 2025 19:04:26 UTC