C2LC-109: Focus is lost when activating the Run button

Metadata

Source
C2LC-109
Type
Sub-task
Priority
N/A
Status
Done
Resolution
N/A
Assignee
Daniel Cho
Reporter
Created
2019-12-19T13:36:42.088-0500
Updated
2021-10-15T16:14:22.191-0400
Versions
N/A
Fixed Versions
  1. Coding Env 0.2
Component
N/A

Description

Steps to reproduce:

  • Load the Coding Environment
  • Connect to Dash
  • Add a command step to the program
  • Navigate by keyboard to the Run button
  • Activate the Run button by pressing Space or Enter

Expected: Focus to remain on the Run button

Actual:

  • Focus is lost
  • This causes NVDA to say “Unavailable” when Run is activated

Notes:

  • This happens because we are disabling the Run button when the program runs, and disabled controls in HTML cannot have focus
  • An alternative would be to change the Run button into a Run/Pause or Run/Stop toggle button, rather than disabling it

Comments

  • Simon Bates commented 2020-01-07T16:15:45.238-0500

    We will change the Run button to use aria-disabled, rather than the HTML disabled attribute. This will indicate to ATs that the button is disabled but will keep it tab-focusable. We will need to implement aria-disabled checking in our button click handler as the button will remain operational (the HTML button element is no longer actually disabled).