# Web:S6821 role="toolbar" is not a valid role

**URL:** <https://community.sonarsource.com/t/web-s6821-role-toolbar-is-not-a-valid-role/116970>\
**Category:** Report False-positive / False-negative...\
**Tags:** html\
**Created:** [June 10, 2024, 10:45am UTC](https://community.sonarsource.com/t/web-s6821-role-toolbar-is-not-a-valid-role/116970 "2024-06-10T10:45:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagoiq](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/imagoiq/32/58531_2.png) [@imagoiq](https://community.sonarsource.com/u/imagoiq)\
**Post date:** [June 10, 2024, 10:45am UTC](https://community.sonarsource.com/t/web-s6821-role-toolbar-is-not-a-valid-role/116970/1 "2024-06-10T10:45:41Z")

</div>

**What**  
Concerns the rule: _Web:S6821 - DOM elements with ARIA roles should have a valid non-abstract role_

The rule is reporting that the attribute `role` with the value `toolbar` is invalid.

But this value exists in the linked documentation [Accessible Rich Internet Applications (WAI-ARIA) 1.2](https://www.w3.org/TR/wai-aria-1.2/#toolbar)

**What language is this for?**  
HTML

**IDE/Plugins versions**  
SonarLint 10.6.2.78685  
IntelliJ IDEA 2024.1.2 (Ultimate Edition)

**How can we reproduce the problem?**  
You can use the code in this bootstrap example in an HTML document: [Button group · Bootstrap v5.3](https://getbootstrap.com/docs/5.3/components/button-group/#button-toolbar)

---

<div class="post-metadata">

**Author:** ![gab](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gab/32/72206_2.png) [@gab](https://community.sonarsource.com/u/gab)\
**Post date:** [July 4, 2024, 3:48pm UTC](https://community.sonarsource.com/t/web-s6821-role-toolbar-is-not-a-valid-role/116970/4 "2024-07-04T15:48:33Z")

</div>

Hi Loïc,

Sorry for the long delay. Thank you for raising this!

Indeed, `toolbar` is a valid `role` and shouldn’t be raised as an issue in this case.

I created a ticket to track this false positive:  
[https://sonarsource.atlassian.net/browse/SONARHTML-256](https://sonarsource.atlassian.net/browse/SONARHTML-256)
