Skip to content

Commit

Permalink
Resolve remaining Storybook Axe violations (#3615)
Browse files Browse the repository at this point in the history
* Resolve remaining Storybook Axe violations

* test(vrt): update snapshots

* Update snapshot

* Adjust MarkdownViewer story

---------

Co-authored-by: TylerJDev <[email protected]>
  • Loading branch information
TylerJDev and TylerJDev authored Aug 11, 2023
1 parent f487a8d commit 65b888c
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Button/Button.dev.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const TestSxProp = () => {
color: 'deepskyblue',
},
[`@media screen and (max-width: 768px)`]: {
color: 'salmon',
color: 'maroon',
},
'@media screen and (min-width: 768px)': {
':focus': {
Expand Down
1 change: 1 addition & 0 deletions src/PageHeader/PageHeader.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export const WithPageLayout = () => {
p: 3,
borderRadius: 2,
}}
tabIndex={0}
>
This box has really long content. If it is too long, it will cause x overflow and should show a scrollbar.
When this overflows, it should not break to overall page layout!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,13 @@ exports[`ChoiceFieldset renders with a success validation message 1`] = `
margin-top: 8px;
}
@media (prefers-reduced-motion) {
.c11 {
-webkit-animation: none;
animation: none;
}
}
@media (forced-colors:active) {
.c6 {
background-color: canvastext;
Expand Down Expand Up @@ -2408,6 +2415,13 @@ exports[`ChoiceFieldset renders with an error validation message 1`] = `
margin-top: 8px;
}
@media (prefers-reduced-motion) {
.c11 {
-webkit-animation: none;
animation: none;
}
}
@media (forced-colors:active) {
.c6 {
background-color: canvastext;
Expand Down
14 changes: 7 additions & 7 deletions src/drafts/Button2/Button.dev.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const TestSxProp = () => {
<Button
size="medium"
sx={{
color: 'deeppink',
color: 'firebrick',
}}
>
Medium Pink
Medium Red
</Button>
<Button
size="small"
Expand All @@ -53,22 +53,22 @@ export const TestSxProp = () => {
color: 'deepskyblue',
},
[`@media screen and (max-width: 768px)`]: {
color: 'salmon',
color: 'maroon',
},
'@media screen and (min-width: 768px)': {
':focus': {
color: 'green',
},
},
'@media (min-width: 1440)': {
color: 'deeppink',
color: 'firebrick',
},
}}
>
Pink
Red
</Button>
<Button leadingIcon={SearchIcon} variant="invisible" sx={{color: 'deeppink'}}>
Pink
<Button leadingIcon={SearchIcon} variant="invisible" sx={{color: 'firebrick'}}>
Red
</Button>
<Button
size="small"
Expand Down
6 changes: 3 additions & 3 deletions src/drafts/MarkdownViewer/MarkdownViewer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ const sampleHtml = `
</ul>
<h4>Tasks</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 1</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 2</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 3</li>
<li class="task-list-item"><label><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 1</label></li>
<li class="task-list-item"><label><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 2</label></li>
<li class="task-list-item"><label><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Task 3</label></li>
</ul>`

const htmlObject = {__html: sampleHtml}
Expand Down
3 changes: 3 additions & 0 deletions src/internal/components/ValidationAnimationContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const fadeIn = keyframes`
// using easeOutQuint easing fn https://easings.net/#easeOutQuint
const AnimatedElement = styled.div<Props>`
animation: ${props => props.show && css`170ms ${fadeIn} cubic-bezier(0.44, 0.74, 0.36, 1);`};
@media (prefers-reduced-motion) {
animation: none;
}
`
const ValidationAnimationContainer: React.FC<React.PropsWithChildren<Props>> = ({show, children}) => {
const [shouldRender, setRender] = useState(show)
Expand Down
1 change: 1 addition & 0 deletions src/stories/useAnchoredPosition.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export const ComplexAncestry = () => {
overflow: 'auto',
position: 'relative',
}}
tabIndex={0}
>
Clipping container - this element has <code>overflow</code> set to something other than <code>visible</code>
<Box m={space} p={space} sx={{border: '1px solid #000', backgroundColor: 'blue.2', position: 'relative'}}>
Expand Down

0 comments on commit 65b888c

Please sign in to comment.