Skip to content

Commit

Permalink
a11y: Add sr-only info for NC checkbox label
Browse files Browse the repository at this point in the history
Tells user that focus is going to be moved automatically on the following textarea
  • Loading branch information
yaaax committed Aug 1, 2024
1 parent 7d77fdb commit d40b766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const props = defineProps<{
const statuses: Array<{
label: string;
extraLabel?: string;
value: CriteriumResultStatus;
color?: RadioColor;
}> = [
Expand All @@ -50,6 +51,7 @@ const statuses: Array<{
},
{
label: formatStatus(CriteriumResultStatus.NOT_COMPLIANT),
extraLabel: "le focus se déplacera sur le champ de saisie ci-après",
value: CriteriumResultStatus.NOT_COMPLIANT,
color: "red"
},
Expand Down
3 changes: 2 additions & 1 deletion confiture-web-app/src/components/ui/RadioGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const props = defineProps<{
items: {
value: any;
label: string;
extraLabel?: string;
color?: RadioColor;
}[];
disabled?: boolean;
Expand Down Expand Up @@ -53,7 +54,7 @@ function handleChange(value: string) {
:class="item.color"
:for="`checkbox-group-${uniqueId}--${i}`"
>
{{ item.label }}
{{ item.label }}<span class="fr-sr-only">, {{ item.extraLabel }}</span>
</label>
</div>
</fieldset>
Expand Down

0 comments on commit d40b766

Please sign in to comment.