Page MenuHomePhabricator

Ensure only one search button is present at a particular time in Vector
Open, LowPublic

Description

Created as a result of AFB accessibility testing results T323634

There also appears to be a “Go” button that only appears before the search field. This can only be seen if the search field never gains focus. For screen reader users this is only encountered when navigating in browse mode. The “Go” button doesn’t appear when using VoiceOver.

When browsing the page, a Search button and a Go button appear after the Search field, but the Go button disappears after entering and typing text into the field.
Recommendation: The Go button should not be focusable. It appears to be a holdover from reused code as it disappears when the field is focused and does not return until the page is refreshed

TODO

  • Only one search button is accessible at a certain time
  • Code comments/documentation is updated

Developer notes

Vector renders two buttons, one for 'go' and one for 'fulltext' search modes. Presumably the 'go' button should be for no js users, and only one button is supposed to be shown at a particular time. This code in searchSuggest.js is supposed to remove a button, but the 'searchSuggest' module doesn't even seem to be used in Vector anyway. One possible solution is to use the no-js class to ensure only 1 button is visible