Skip to content

Commit

Permalink
395: pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lehju committed Jan 22, 2025
1 parent de45ab0 commit 98d442a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/Form/MucCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const modelValue = defineModel<boolean>({ default: false });
const { label } = defineProps<{
/**
* id of checkbox
* Unique identifier for the checkbox. Required property used to associate the checkbox with its label and hint text for accessibility.
*/
id: string;
/**
Expand Down
6 changes: 4 additions & 2 deletions src/components/Form/MucInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class="m-input autocomplete-input"
:type="type"
v-model="modelValue"
:aria-describedby="'input-hint-' + id"
:aria-describedby="hint ? 'input-hint-' + id : undefined"
:placeholder="placeholder"
:required="required"
/>
Expand Down Expand Up @@ -67,6 +67,8 @@
id="text-input-error"
v-if="errorMsg"
tabindex="0"
role="alert"
aria-live="polite"
>
{{ errorMsg }}
</form-error-message>
Expand Down Expand Up @@ -100,7 +102,7 @@ const {
dataList = [] as string[],
} = defineProps<{
/**
* id of input
* Unique identifier for the input. Required property used to associate the input with its label and hint text for accessibility.
*/
id: string;
/**
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/MucRadioButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:id="'radio-' + id"
class="m-radios__input"
type="radio"
:aria-describedby="'radio-hint-' + id"
:aria-describedby="hint ? 'radio-hint-' + id : undefined"
:checked="isChecked"
:disabled="isDisabled"
@click.stop="clicked"
Expand Down Expand Up @@ -35,7 +35,7 @@ import { RadioButtonGroupKey } from "./MucRadioButtonTypes";
const { value, disabled = false } = defineProps<{
/**
* id of radiobutton
* Unique identifier for the radiobutton. Required property used to associate the radiobutton with its label and hint text for accessibility.
*/
id: string;
/**
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/MucSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
:id="'select-' + id"
type="text"
class="m-input m-combobox m-combobox--single"
:aria-describedby="'select-hint-' + id"
:aria-describedby="hint ? 'select-hint-' + id : undefined"
v-model="searchValue"
@click="openItemList"
/>
Expand Down Expand Up @@ -119,7 +119,7 @@ const {
itemTitle = "title",
} = defineProps<{
/**
* id of select
* Unique identifier for the select. Required property used to associate the select with its label and hint text for accessibility.
*/
id: string;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/MucTextArea.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const Required = {
export const BigTextArea = {
args: {
...Default.args,
id: "big-test-area",
id: "big-text-area",
rows: 7,
label: "Big textarea",
hint: "Write a lot of text",
Expand Down
6 changes: 4 additions & 2 deletions src/components/Form/MucTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<textarea
:id="'textarea-' + id"
class="m-textarea"
:aria-describedby="'textarea-hint-' + id"
:aria-describedby="hint ? 'textarea-hint-' + id : undefined"
:rows="rows"
:placeholder="placeholder"
v-model="modelValue"
Expand All @@ -31,6 +31,8 @@
<form-error-message
v-if="errorMsg"
tabindex="0"
role="alert"
aria-live="polite"
>
{{ errorMsg }}
</form-error-message>
Expand All @@ -51,7 +53,7 @@ const {
required = false,
} = defineProps<{
/**
* id of textarea
* Unique identifier for the textarea. Required property used to associate the textarea with its label and hint text for accessibility.
*/
id: string;
/**
Expand Down

0 comments on commit 98d442a

Please sign in to comment.