Skip to content

Commit 8faa499

Browse files
authored
fix: Accesibility reading columns and values except tags (#4122)
* fix reading columns and values except tags * fix status badge * fix test
1 parent 7c8ee0a commit 8faa499

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/shared/components/DynamicPageComponent/DynamicPageComponent.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ const Column = ({ title, children, columnSpan, image, style = {} }) => {
8686
<div className="page-header__column" style={styleComputed}>
8787
{image && <div className="image">{image}</div>}
8888
<div className="content-container">
89-
<div className="title bsl-has-color-status-4 ">{title}:</div>
90-
<span className="content bsl-has-color-text-1">{children}</span>
89+
<div className="title bsl-has-color-status-4 " tabIndex={0}>
90+
{title}:
91+
</div>
92+
<span className="content bsl-has-color-text-1" tabIndex={0}>
93+
{children}
94+
</span>
9195
</div>
9296
</div>
9397
);

src/shared/components/Labels/Labels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useTranslation } from 'react-i18next';
22
import classNames from 'classnames';
33
import { EMPTY_TEXT_PLACEHOLDER } from 'shared/constants';
4-
import { Tag, Label } from '@ui5/webcomponents-react';
4+
import { Label, Tag } from '@ui5/webcomponents-react';
55

66
import './Labels.scss';
77

src/shared/components/StatusBadge/StatusBadge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const StatusBadge = ({
131131
}
132132
}
133133

134-
// tooltipContent is DEPRECATED. Use the TooltipBadge component if a Badge with a simple Tooltip is needed.
134+
// TODO: tooltipContent is DEPRECATED. Use the TooltipBadge component if a Badge with a simple Tooltip is needed.
135135
if (tooltipContent) {
136136
return (
137137
<PopoverBadge
@@ -145,7 +145,7 @@ export const StatusBadge = ({
145145
} else if (noTooltip) {
146146
return (
147147
<ObjectStatus
148-
aria-label="Status"
148+
aria-label={badgeContent}
149149
role="status"
150150
inverted
151151
state={type}

tests/integration/tests/namespace/test-jobs.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ context('Test Jobs', () => {
117117
.should('exist');
118118

119119
// status
120-
cy.get('[aria-label="Status"]', { timeout: 75 * 1000 })
121-
.first()
122-
.contains('Completed');
120+
cy.get('[aria-label="Completed"]', { timeout: 75 * 1000 });
123121

124122
// check logs
125123
checkJobLogs({

0 commit comments

Comments
 (0)