Skip to content

Commit d1c887e

Browse files
committed
docs(tab): correcting icon only doc
1 parent a9d8dfb commit d1c887e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/tabs/tab.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,11 @@ The `<sp-tab>` element consists of a label and an optional icon.
3737

3838
#### Icon only
3939

40-
For tabs that have an icon and no visible label, the icon should have a `label`. Icons should not be used just as decoration. If the tab item does not have a visible label, it must still have a tooltip to disclose the label.
40+
For tabs that have an icon and no visible label, the icon should have an `aria-label`. Icons should not be used just as decoration. If the tab item does not have a visible label, it must still have a tooltip to disclose the label.
4141

4242
```html
43-
<sp-tab value="complete">
44-
<sp-icon-checkmark
45-
slot="icon"
46-
label="Checking your work"
47-
aria-label="Tab w/ checkmark"
48-
></sp-icon-checkmark>
43+
<sp-tab value="complete" aria-label="Tab with checkmark">
44+
<sp-icon-checkmark slot="icon"></sp-icon-checkmark>
4945
</sp-tab>
5046
```
5147

0 commit comments

Comments
 (0)