The rule Web:S5255 triggers in Vue templates for elements with the same landmark role, even if these are made mutually exclusive via control flow directives (v-if
, v-else
, v-else-if
).
This issue can be reproduced with the following markup:
<template>
<nav v-if="true"></nav>
<nav v-else></nav>
</template>
SonarQube reports the issue Add an "aria-label" or "aria-labbelledby" attribute to this element.
for both of these element.
Version: Developer Edition 2025.1.1.104738