Skip to content

Commit 52dd917

Browse files
authored
fix: ExpandableListItem cannot be activated using keyboard (kyma-project#4226)
1 parent dc6cf08 commit 52dd917

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/shared/components/ExpandableListItem/ExpandableListItem.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ export const ExpandableListItem = ({
5454
<ListItemStandard
5555
onClick={() => setExpanded(!expanded)}
5656
className="expandable-item"
57+
aria-expanded={expanded}
58+
onKeyDown={(e) => {
59+
if (e.key === 'Enter' || e.key === ' ') {
60+
e.preventDefault();
61+
setExpanded(!expanded);
62+
}
63+
}}
5764
>
5865
<div className="expandable-item__header">
5966
{expanded ? (

src/shared/components/ResourceStatusCard/ResourceStatusCard.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ export function ResourceStatusCard({
3636
)}
3737
{conditions && (
3838
<>
39-
<div className="title bsl-has-color-status-4 sap-margin-x-small">
39+
<div
40+
className="title bsl-has-color-status-4 sap-margin-x-small"
41+
tabIndex={0}
42+
>
4043
{`${t('common.headers.conditions')}:`}
4144
</div>
4245
<ConditionList conditions={conditions} />

0 commit comments

Comments
 (0)