mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
add aria-pressed
This commit is contained in:
@@ -102,6 +102,7 @@ export class ButtonGroup implements ComponentInterface {
|
||||
button.size = size;
|
||||
button.onclick = () => this.handleButtonClick(index, button.getAttribute('value'));
|
||||
button.classList.toggle('active', index === this.activeIndex);
|
||||
button.setAttribute('aria-pressed', index === this.activeIndex ? 'true' : 'false');
|
||||
})}
|
||||
</Host>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user