Skip to content

Commit

Permalink
fix some accessablility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
karambarakat committed Oct 28, 2023
1 parent c867f52 commit 266263d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
# run: ./ci/test-sb.sh
# shell: bash

- name: backend integration test
run: ./ci/test-be.sh
shell: sh
# - name: backend integration test
# run: ./ci/test-be.sh
# shell: sh

# - name: run end-to-end test
# run: ./ci/test-e2e.sh
Expand All @@ -64,4 +64,4 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
storybookBuildDir: pkgs/ui/storybook-static
storybookBuildDir: ./pkgs/ui/storybook-static
11 changes: 10 additions & 1 deletion pkgs/ui/src/components/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ export default {

export const Default = {
render: () => {
return <Dialog content={<div>hi</div>} trigger={<Plus />} />
return (
<Dialog
content={<div>hi</div>}
trigger={
<button aria-label="open dialog">
<Plus />
</button>
}
/>
)
},
} satisfies SB.Story<typeof component>
2 changes: 1 addition & 1 deletion pkgs/ui/src/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const fontSizes = {
lg: tw`text-[1.1875rem] font-[600] leading-[1.8125rem]`,
h2: tw`text-[1.5rem] font-[400] leading-[2rem]`,
h1: tw`text-[2rem] font-[600] leading-[2rem]`,
subtle: tw`text-gray-600 dark:text-gray-400`,
subtle: tw`text-gray-600 dark:text-gray-300/80`,
null: tw``,
}

Expand Down
2 changes: 1 addition & 1 deletion pkgs/ui/src/components/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Base = {} as SB.Story<typeof component>

export const Hovered = {
play: async ({ canvasElement }) => {
const elem = within(canvasElement).getByRole('button')
const elem = within(canvasElement).getByRole('tooltip')
elem.focus()
},
} as SB.Story<typeof component>
6 changes: 3 additions & 3 deletions pkgs/ui/src/components/forms/_Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function FieldError(props: JSX.IntrinsicAttributes) {
const { meta } = useFieldContext()

return (
<div tw="text-red-600 dark:text-red-400 text-sm" {...props}>
<div tw="text-red-600 dark:text-red-300 text-sm" {...props}>
{meta.touched && meta.error}
</div>
)
Expand Down Expand Up @@ -170,7 +170,7 @@ export function Title() {
{
// eslint-disable-next-line quotes
["&[data-required='true']::after"]: css`
${tw`text-red-600 dark:text-red-400`};
${tw`text-red-600 dark:text-red-300`};
content: ' *';
`,
},
Expand All @@ -182,7 +182,7 @@ export function Title() {
{
[`#${id}:focus-within &, #${id}.value &`]: tw`translate-y-0 text-xs `,
[`#${id}:focus-within &`]: tw`text-blue-600 dark:text-blue-400`,
[`#${id}.error &`]: tw`text-red-600 dark:text-red-400`,
[`#${id}.error &`]: tw`text-red-600 dark:text-red-300`,
},
]}
data-required={req}
Expand Down

0 comments on commit 266263d

Please sign in to comment.