a11y - wrap notification level radios in fieldsets (#7471)

* notification settings radios table -> fieldset

Signed-off-by: Kerry Archibald <kerrya@element.io>

* aria-label for inputs

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update tests for fielset

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove unneccessary wrapping div

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix stylelint

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-01-06 18:52:06 +01:00 committed by GitHub
parent b1066a5699
commit dc2d52c1f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 66 deletions

View file

@ -245,8 +245,8 @@ describe('<Notifications />', () => {
const section = 'vector_global';
const globalSection = findByTestId(component, `notif-section-${section}`);
// 16 notification rules with class 'global'
expect(globalSection.find('td').length).toEqual(16);
// 4 notification rules with class 'global'
expect(globalSection.find('fieldset').length).toEqual(4);
// oneToOneRule is set to 'on'
const oneToOneRuleElement = findByTestId(component, section + oneToOneRule.rule_id);
expect(getCheckedRadioForRule(oneToOneRuleElement)).toEqual('On');