Skip to content

Make the security level panel and button more accessible

  • We use semantic elements if possible and otherwise set aria attributes. In particular, we give the panel a dialog role.
  • We set the "Restore Defaults" button as default if it is shown since it is the recommended action.
  • We focus the default button when showing the popup.
  • We handle the case where the security level button is in the overflow menu by closing the overflow menu first. Before this key navigation in the sub-panel could disrupt the position in the parent panel.
  • We use HTML for the main content of the panel.

Also do some general clean up in this area:

  • Clean up some unnecessary imports and use var instead of const for exported variables.
  • Remove SecurityLevels from global scope, no longer try and account for missing preference values and stop using the int values outside of SecurityLevelPrefs

Part of #32274 (closed)

Edited by henry

Merge request reports

Loading