Fork BDropdown in order to accommodate a11y recommendations
After reviewing the accessibility audit for GlDdopdown
and it’s sub-components, a few of the problems we need to address cannot be achieved without forking the original bootstrap-vue
implementation.
As an example aria-haspopup
and aria-expanded
are hard-coded in the original implementation:
https://github.com/bootstrap-vue/bootstrap-vue/blob/45635d1d391263192787e9e0bddc004abe115ace/src/components/dropdown/dropdown.js#L155
In order to fully address the a11y issues we will need to abandon the current method of extending BDropdown
within GlDropdown
and fork it instead.
Our goal is to ensure that we provide enough flexibility to render proper accessibility attributes for several common use cases for dropdowns:
- Menu
- Disclosure
- Combo Box
- Form Element (e.g.
select
replacement) - etc.
See #1534 (closed) for further detail. This will support the future effort to produce bespoke components for each of these dropdown variants which will extend GlDropdown
and set appropriate defaults.