You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to implement the sbb-autocomplete-grid component in order to provide the possibility to add a custom action (e.g. "Add to favourites") to the autocomplete options.
The sbb-autocomplete-grid introduces few more specific components to provide the options and the relative custom action:
sbb-autocomplete-grid-row;
sbb-autocomplete-grid-option;
sbb-autocomplete-grid-button for which an icon-name can be provided via prop;
When a button is clicked, the behaviour should be up to the consumer.
sbb-autocomplete-grid-button should have a method (or in lit a getter) that returns the related sbb-autocomplete-grid-option
We must use this approach in order to preserve the meaningful aria role='combobox' strategy on the normal sbb-autocomplete and make it possible to add the custom action feature with sbb-autocomplete-grid, but with the disadvantage of a less robust accessibility, since we cannot use the 'combobox' in this case.
Feature Description
We want to implement the
sbb-autocomplete-grid
component in order to provide the possibility to add a custom action (e.g. "Add to favourites") to the autocomplete options.Reference Guideline: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/grid-combo/
PoC
Reference
Figma Spec
Examples/References (in both you have to enter a search term to have it available to delete the history in future searches):
https://www.google.com/
https://music.youtube.com/
Design Spec
Technical Spec
sbb-autocomplete
imlpementation https://lyne-storybook.app.sbb.ch/?path=/docs/components-sbb-autocomplete--docs.sbb-autocomplete-grid
introduces few more specific components to provide the options and the relative custom action:sbb-autocomplete-grid-row
;sbb-autocomplete-grid-option
;sbb-autocomplete-grid-button
for which anicon-name
can be provided via prop;sbb-autocomplete-grid-button
should have a method (or in lit a getter) that returns the relatedsbb-autocomplete-grid-option
sbb-autocomplete
and make it possible to add the custom action feature withsbb-autocomplete-grid
, but with the disadvantage of a less robust accessibility, since we cannot use the 'combobox' in this case.Accessibility
Consider the usage of the ARIA: grid role pattern.
Definition of Done
The text was updated successfully, but these errors were encountered: