Skip to content

Commit b98b9ba

Browse files
authored
add back id="hint" (#1192)
1 parent 7b18be8 commit b98b9ba

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

packages/webawesome/docs/docs/resources/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
2222
- Fixed the missing `nanoid` dependency in `package.json` [discuss:1139]
2323
- Fixed a bug in `<wa-slider>` that prevented the hint from showing up [discuss:1172]
2424
- Fixed a bug in `<wa-textarea>` where setting `resize="auto"` caused the height of the textarea to double [issue:1155]
25+
- Fixed a bug in `<wa-color-picker>`, `<wa-checkbox>`, `<wa-input>`, `<wa-radio-group>`, `<wa-switch>`, and `<wa-textarea>` that prevented screen readers from announcing hints [issue:1186]
2526
- Fixed a bug in `<wa-card>` that caused slotted media to have incorrectly rounded corners [issue:1107]
2627
- Fixed a bug in `<wa-button-group>` that prevented pill buttons from rendering corners properly [issue:1165]
2728
- Fixed a bug in `<wa-button-group>` that caused some vertical groups to appear horizontal [issue:1152]

packages/webawesome/src/components/checkbox/checkbox.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,14 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement {
234234
</label>
235235
236236
<slot
237+
id="hint"
238+
part="hint"
237239
name="hint"
238240
aria-hidden=${hasHint ? 'false' : 'true'}
239241
class="${classMap({ 'has-slotted': hasHint })}"
240-
id="hint"
241-
part="hint"
242-
>${this.hint}</slot
243242
>
243+
${this.hint}
244+
</slot>
244245
`;
245246
}
246247
}

packages/webawesome/src/components/color-picker/color-picker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ export default class WaColorPicker extends WebAwesomeFormAssociatedElement {
13101310
></button>
13111311
13121312
<slot
1313+
id="hint"
13131314
name="hint"
13141315
part="hint"
13151316
class=${classMap({

packages/webawesome/src/components/input/input.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,9 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
432432
</div>
433433
434434
<slot
435-
name="hint"
435+
id="hint"
436436
part="hint"
437+
name="hint"
437438
class=${classMap({
438439
'has-slotted': hasHint,
439440
})}

packages/webawesome/src/components/radio-group/radio-group.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ export default class WaRadioGroup extends WebAwesomeFormAssociatedElement {
370370
<slot part="form-control-input" @slotchange=${this.syncRadioElements}></slot>
371371
372372
<slot
373+
id="hint"
373374
name="hint"
374375
part="hint"
375376
class=${classMap({

packages/webawesome/src/components/switch/switch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ export default class WaSwitch extends WebAwesomeFormAssociatedElement {
243243
</label>
244244
245245
<slot
246+
id="hint"
246247
name="hint"
247248
part="hint"
248249
class=${classMap({

packages/webawesome/src/components/textarea/textarea.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
374374
</div>
375375
376376
<slot
377+
id="hint"
377378
name="hint"
378379
part="hint"
379380
aria-hidden=${hasHint ? 'false' : 'true'}

0 commit comments

Comments
 (0)