Skip to content

Commit

Permalink
Merge pull request #79 from github/clarify-n-in-readme
Browse files Browse the repository at this point in the history
clarify N in Readme
  • Loading branch information
keithamus authored Feb 19, 2024
2 parents 7a8fa4a + 8ff3dbe commit cc846d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ import '@github/tab-container-element'
</tab-container>
```

If none of the tabs have `aria-selected=true`, then the first tab will be selected automatically. You can also add the `default-tab=N` attribute to avoid having to set `aria-selected=true` on the desired tab.
If none of the tabs have `aria-selected=true`, then the first tab will be selected automatically. You can also add the `default-tab=N` attribute to avoid having to set `aria-selected=true` on the desired tab, where `N` is the 0-based tab index:

```html
<!-- The _second_ tab will be selected -->
<tab-container default-tab="1">
<button type="button" id="tab-one" role="tab">Tab one</button>
<button type="button" id="tab-two" role="tab">Tab two</button>
<button type="button" id="tab-three" role="tab">Tab three</button>
<!-- ... -->
</tab-container>

### Events

Expand Down

0 comments on commit cc846d3

Please sign in to comment.