Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tabs): add aria #1120

Closed
wants to merge 1 commit into from
Closed

Conversation

ygatesoupe
Copy link
Contributor

Fixes #1118

This PR adds aria attributes to tab headings

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would have added at least another test to ensure that attributes are updated correctly too

@@ -81,15 +81,15 @@ export interface NgbTabChangeEvent {
template: `
<ul [class]="'nav nav-' + type" role="tablist">
<li class="nav-item" *ngFor="let tab of tabs">
<a [id]="tab.id" class="nav-link" [class.active]="tab.id === activeId" [class.disabled]="tab.disabled"
href (click)="!!select(tab.id)">
<a [id]="tab.id" class="nav-link" [class.active]="tab.id === activeId" [class.disabled]="tab.disabled"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about aria-selected? do you think we should add it too?

https://www.w3.org/TR/wai-aria/states_and_properties#aria-selected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants