Forum Discussion
Focus Order and Disabled/ Hidden Buttons
- 4 days ago
Hi MichelleConnerF using the "Disabled" state of the button is the best way to handle buttons for accessibility, if you do not want the user to access them yet, and they are visible on the page. This way, you can include them in the focus order, and users using assistive technology will understand that the buttons exist, but are also aware they are not enabled and cannot be used at that time.
If the buttons are visually hidden ("Hidden" state) on the page, until the pre-requisites are met, this is also fine. The buttons will be in the focus order once they are changed to their "Normal" state. This is also valid for accessibility.
Ensure that if you are making things hidden, be aware that visually impaired users may not be aware that an item that was hidden on the page is now visible. The user may only discover the element by accidental discovery, unless communicated to the user.
Hi MichelleConnerF using the "Disabled" state of the button is the best way to handle buttons for accessibility, if you do not want the user to access them yet, and they are visible on the page. This way, you can include them in the focus order, and users using assistive technology will understand that the buttons exist, but are also aware they are not enabled and cannot be used at that time.
If the buttons are visually hidden ("Hidden" state) on the page, until the pre-requisites are met, this is also fine. The buttons will be in the focus order once they are changed to their "Normal" state. This is also valid for accessibility.
Ensure that if you are making things hidden, be aware that visually impaired users may not be aware that an item that was hidden on the page is now visible. The user may only discover the element by accidental discovery, unless communicated to the user.