mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 21:57:41 +03:00
Why? role="radio" items need to be in the same DOM scope to properly announce "radio X of X" and not "radio 1 of 1" PiperOrigin-RevId: 559908996
20 lines
395 B
TypeScript
20 lines
395 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {Harness} from '../testing/harness.js';
|
|
|
|
import {Radio} from './internal/radio.js';
|
|
|
|
/**
|
|
* Test harness for radio.
|
|
*/
|
|
export class RadioHarness extends Harness<Radio> {
|
|
override async getInteractiveElement() {
|
|
await this.element.updateComplete;
|
|
return this.element as HTMLElement;
|
|
}
|
|
}
|