diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2023-06-28 11:39:02 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-06-29 20:05:14 +0000 |
commit | 63fc7d901eaacd42e9a40099906c38ae2aa779d4 (patch) | |
tree | 706d7f87b12f46924f40cfb813f9666b8e055a68 /server/sonar-web/src/main/js/apps/component-measures | |
parent | 996150ef90458db8fe1aada5d92bce53855de987 (diff) | |
download | sonarqube-63fc7d901eaacd42e9a40099906c38ae2aa779d4.tar.gz sonarqube-63fc7d901eaacd42e9a40099906c38ae2aa779d4.zip |
SONAR-19485 Fix accessibility issue with Table component
Diffstat (limited to 'server/sonar-web/src/main/js/apps/component-measures')
-rw-r--r-- | server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx index 9de89b8982f..a55d5f14eff 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx @@ -84,7 +84,7 @@ export default function ComponentCell(props: ComponentCellProps) { } return ( - <ContentCell className="sw-py-3 sw-truncate sw-flex"> + <ContentCell className="sw-py-3 sw-truncate"> <HoverLink aria-hidden tabIndex={-1} diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx index 797671d0793..26a5e7a18e3 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { ContentCell, NumericalCell, Table, TableRow, TableRowInteractive } from 'design-system'; +import { times } from 'lodash'; import * as React from 'react'; import { getLocalizedMetricName } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; @@ -48,7 +49,8 @@ export default function ComponentsList({ components, metric, metrics, ...props } const otherMetrics = (complementary[metric.key] || []).map((key) => metrics[key]); return ( <Table - gridTemplate={`1fr repeat(${otherMetrics.length + 1}, min-content)`} + columnCount={otherMetrics.length + 2} + columnWidths={['auto', ...times(otherMetrics.length + 1, () => '1%')]} header={ otherMetrics.length > 0 && ( <TableRow> |