Replies: 6 comments 5 replies
-
aria-propsElements cannot use an invalid ARIA attribute. This will fail if it finds an aria-* property that is not listed in WAI-ARIA States and Properties spec. Incorrect ARIA attributes can prevent assistive technologies from conveying the intended meaning to users. Example✔ Succeed<template>
<input aria-labelledby="address" />
</template>❌ Fail<template>
<input aria-labeledby="address" />
</template> |
Beta Was this translation helpful? Give feedback.
-
aria-roleElements with ARIA roles must use a valid, non-abstract ARIA role listed in Definition of Roles Incorrect role can prevent assistive technologies from conveying the intended meaning to users. Example✔ Succeed<template>
<div role="button" />
<!-- Good: "button" is a valid ARIA role -->
<div :role="role" />
<!-- Good: No ARIA role -->
<Foo role="test" />
<!-- Good: ignoreNonDOM is set to true -->
</template>❌ Fail<template>
<div role="datepicker" />
<!-- Bad: "datepicker" is not an ARIA role -->
<div role="range" />
<!-- Bad: "range" is an _abstract_ ARIA role -->
</template> |
Beta Was this translation helpful? Give feedback.
-
useUniqueElementIdsI saw this implemented in Biome, where it enforces unique ID usage. Since Example✔ Succeed<script setup>
import { useId } from 'vue'
const id = useId()
</script>
<template>
<form>
<label :for="id">Name:</label>
<input :id="id" type="text" />
</form>
</template>❌ Fail<template>
<div id=“foo”>bar</div>
<!-- Bad: id attribute should not be a static string literal. Generate unique IDs using useId() -->
</template> |
Beta Was this translation helpful? Give feedback.
-
|
Awesome! |
Beta Was this translation helpful? Give feedback.
-
|
Currently, I'm implementing optional "cross-file" analyze in vize/croquis, it might be helpfull to detect some non-unique ids. |
Beta Was this translation helpful? Give feedback.
-
|
relates: #1629 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Propose what kinds of accessibility‑related lint rules would be beneficial for Vize Patina.
https://github.com/ubugeeei/vize/tree/main/crates/vize_patina/src/rules/a11y
Beta Was this translation helpful? Give feedback.
All reactions