Skip to content

[Accessibility]: Input and associated elements: Enforce a11y through TypeScript

Created by: umpox

Description

We want to ensure all of our Inputs are accessible for the future. We should aim to do this through enforcing TypeScript interfaces that require labels to be attached to these elements.

We have a solution for this already through AccessibleFieldType.ts.

We should:

  • Use AccessibleFieldType for: Input, FlexTextArea, TextArea
  • Consider narrowing AccessibleFieldType further to require that a label is provided for Checkbox and RadioButton elements. These components shouldn't be used without a visual label, so it doesn't make sense to support hidden ones. (cc: @lrhacker)
  • Migrate any components due to the above changes