[SF][Bar]: Role provided to bar is not cascaded to the DOM and instead take toolbar
as default
#10990
Open
1 task done
Labels
Describe the bug
Role provided to the Bar component is not percolated to the DOM and always retains the default role as
toolbar
which is not a suitable role when a Bar holds no interactive element (but just a title for example).Isolated Example
https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/layouts-floorplans-bar--docs
https://stackblitz.com/edit/react-gnayqu4c?file=src%2FApp.js
Reproduction steps
toolbar
Expected Behaviour
Role passed to the component should be retained on the DOM for accessibility reasons. We use a Bar component for the dialog header with the design parameter set to Header. Looking at the documentation at https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/layouts-floorplans-bar--docs&globals=theme:sap_horizon_dark I get to find that the default role provided to the internal Bar implementation is a 'toolbar'. We need to add a title to the Dialog which generally starts from the left of the dialog header region. Generally a Bar is used to hold titles, buttons and input elements on the page header and footer but in this case we do not have an interactive element on the dialog header and hence setting the role to
toolbar
by default is not the expected behaviourScreenshots or Videos
Even when the role is provided to the Bar it doesn't drill it down the DOM
UI5 Web Components for React Version
2.7.0
UI5 Web Components Version
2.7.0
Browser
Chrome
Operating System
MacOS
Additional Context
No response
Relevant log output
Organization
SF
Declaration
The text was updated successfully, but these errors were encountered: