Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accessibility: added aria-label and replaced SimpleGrid #425

Closed
wants to merge 2 commits into from

Conversation

tkim602
Copy link

@tkim602 tkim602 commented Nov 4, 2024

I initially noticed some accessibility issues in features.tsx and section1.tsx and found out that revising only the section1.tsx can improve in the same way. The audit flagged two issues: 1. missing labels for form elements and 2. list structure issues due to items not being contained within

    and
      elements.

      The original code used for layout. I modified the code to utilize

        and
      • tags by setting component="ul" on . This change resolved the list structure issue.

        Additionally, I applied an aria-label to the JsonInput in section1.tsx. I guess since the mobile does not include the svg content, it did not impact the Lighthouse score on mobile. But it significantly improved accessibility on desktop, so I chose to leave it.

        I am submitting this pull request and would appreciate insights into managing such platform specific discrepancies in accessibility.

        Closes Accessibility Improvement: labels for form elements and proper list semantics #423

@@ -95,20 +95,25 @@ export const Section1 = () => {
optimal view of your data so you can make insights faster than ever.
</Text>
<List
component="ul"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this? AFAIK the default is ul already

@@ -119,6 +124,7 @@ export const Section1 = () => {
<StyledDottedContainer>
<Image className="jc" src="/assets/jsoncrack.svg" alt="json crack" loading="lazy" />
<JsonInput
aria-label="JSON data"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this actually a textarea and not svg, so we can remove it

@AykutSarac AykutSarac closed this Dec 12, 2024
@TallTed
Copy link
Contributor

TallTed commented Dec 13, 2024

@tkim602 — Note that we cannot see the HTML tags in your initial post in this PR. We see text like this —

within

and
elements

You need to wrap such tags in code fences. Single backticks work for inline text `like this.` For larger blocks, put a line containing only three backticks ``` before and after the block,

```
like this.
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility Improvement: labels for form elements and proper list semantics
3 participants