Skip to content

Commit

Permalink
feat(actionsheet): update rendering to comply with accessibility role
Browse files Browse the repository at this point in the history
  • Loading branch information
Juveniel committed Oct 20, 2022
1 parent 606e880 commit 3962cc9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/default/scss/action-sheet/_layout.scss
Expand Up @@ -141,6 +141,8 @@
.k-actionsheet-item {
padding: 0;
box-sizing: border-box;
display: flex;
flex-flow: row nowrap;
}
.k-actionsheet-action {
margin: 0;
Expand Down
2 changes: 2 additions & 0 deletions packages/fluent/scss/action-sheet/_layout.scss
Expand Up @@ -160,6 +160,8 @@
.k-actionsheet-item {
padding: 0;
box-sizing: border-box;
display: flex;
flex-flow: row nowrap;

&:focus,
&.k-focus {
Expand Down
8 changes: 4 additions & 4 deletions packages/html/src/action-sheet/actionsheet-item.tsx
Expand Up @@ -32,7 +32,7 @@ export class ActionSheetItem extends React.Component<ActionSheetItemProps> {


return (
<li
<span
className={classNames(
className,
'k-actionsheet-item',
Expand All @@ -44,16 +44,16 @@ export class ActionSheetItem extends React.Component<ActionSheetItemProps> {
}
)}>
{!children && (text !== '' || description !== '' || iconName !== '') && <>
<a href="#" className="k-actionsheet-action">
<span className="k-actionsheet-action">
{ iconName !== '' && <span className="k-icon-wrap"><Icon className="k-actionsheet-item-icon" name={iconName} /></span> }
<span className="k-actionsheet-item-text">
{ text !== '' && <span className="k-actionsheet-item-title">{text}</span> }
{ description !== '' && <span className="k-actionsheet-item-description">{description}</span> }
</span>
</a>
</span>
</>}
{children}
</li>
</span>
);
}
}
4 changes: 2 additions & 2 deletions packages/html/src/action-sheet/actionsheet-items.tsx
Expand Up @@ -16,12 +16,12 @@ export class ActionSheetItems extends React.Component<ActionSheetItemsProps> {
} = this.props;

return (
<ul className={classNames(
<div className={classNames(
'k-list-ul',
className
)}>
{children}
</ul>
</div>
);
}
}

0 comments on commit 3962cc9

Please sign in to comment.