From 13ef8c734cb370b7a096e9679fe01a9d1935c40f Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Mon, 8 Aug 2022 18:22:46 +0200 Subject: [PATCH] SONAR-16731 [891605] State: Selected state of the element is missing or incorrect --- .../main/js/apps/projects/filters/Filter.tsx | 4 +- .../__snapshots__/Filter-test.tsx.snap | 42 +++++++++++++++++++ .../LanguagesFilter-test.tsx.snap | 6 +++ .../__snapshots__/TagsFilter-test.tsx.snap | 6 +++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx index 8ed53ef69e8..e4961f26995 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx @@ -146,7 +146,9 @@ export default class Filter extends React.PureComponent { type="button" tabIndex={0} key={option} - onClick={this.handleClick}> + onClick={this.handleClick} + role="checkbox" + aria-checked={this.isSelected(option) || isUnderSelectedOption}> {this.props.renderOption(option, this.isSelected(option) || isUnderSelectedOption)} diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap index 43d1c0ae347..e45056ac4a0 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap @@ -9,11 +9,13 @@ exports[`highlights under 1`] = ` className="search-navigator-facet-list projects-facet-list" >