Skip to content

Select component improvement

Grigor Malo requested to merge select-component-improvement into master

Fixes 2 of the issues reported by HHMI about the Select component

  • issue 1: "when using a letter to jump to a part of the list (C for Colorado), it instead jumps to the first option with a C in the text (American Samoa)". This required no change in the component, just a custom function passed with the filterOption prop, to make the filtering resemble the default one of native elements
  • issue 2: "No feedback on how many topics are selected (a max of 3 are required)". Add form item validation to handle the case

There are other issues with the Select component, like the fact that it announces the option list as having only 3 items (HHMI complained about this), or that it doesn't render the listbox element (the one containing the options list) before interacting with the component (throws errors when scanning the page with axe devtools). To fix these and add other accessiblity features we need to hack the antd component. Some work on this regard which fixes the two last mentioned issues can be found in customize-select-component branch

Edited by Grigor Malo

Merge request reports