Compare commits

...

2 Commits

Author SHA1 Message Date
ayeshoali
f2aa7e9e89 style: add border on focused post 2023-03-03 00:04:53 +05:00
ayesha waris
be1a2ccaab fix: fixed post coment actions menu accessibilty for keyboard (#456) 2023-03-01 21:46:23 +05:00
4 changed files with 8 additions and 5 deletions

View File

@@ -99,7 +99,7 @@ function PostCommentsView({ intl }) {
)
)}
<div
className="discussion-comments d-flex flex-column card border-0 post-card-margin post-card-padding"
className="discussion-comments d-flex flex-column card border-0 post-card-margin post-card-padding on-focus"
>
<Post post={thread} handleAddResponseButton={() => setAddingResponse(true)} />
{!thread.closed && (

View File

@@ -119,7 +119,7 @@ function Comment({
/>
)}
<EndorsedAlertBanner postType={postType} content={comment} />
<div className="d-flex flex-column post-card-comment px-4 pt-3.5 pb-10px" aria-level={5}>
<div className="d-flex flex-column post-card-comment px-4 pt-3.5 pb-10px" tabIndex="0">
<HoverCard
commentOrPost={comment}
actionHandlers={actionHandlers}

View File

@@ -90,8 +90,9 @@ function Post({
return (
<div
className="d-flex flex-column w-100 mw-100 post-card-comment"
aria-level={5}
data-testid={`post-${post.id}`}
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
tabIndex="0"
>
<Confirmation
isOpen={isDeleting}

View File

@@ -433,7 +433,7 @@ header {
pointer-events: none;
}
.on-focus:focus-visible {
.on-focus:focus-within {
outline: 2px solid black;
}
@@ -442,6 +442,8 @@ header {
}
.post-card-comment {
outline: none;
&:not(:hover),
&:not(:focus) {
.hover-card {
@@ -450,7 +452,7 @@ header {
}
&:hover,
&:focus {
&:focus-within {
.hover-card {
display: flex;
}