Skip to content

feat: Add lint rule for Spinner component #90

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

Merged

Conversation

Harsh-Modi278
Copy link
Contributor

@Harsh-Modi278 Harsh-Modi278 commented Sep 16, 2024

Add lint rule for Spinner component.
The Spinner component needs to have following attributes to be accessible:

  • aria-live
  • aria-label
    This information was inferred from component's implementation here.

Screenshot:
Screenshot 2024-09-17 at 12 41 06 PM

Examples of incorrect code for this rule:

<Spinner {...props} />
<Spinner 
    {...props} 
    aria-label="some text"
/>
<Spinner 
    {...props} 
    aria-live="polite"
/>

Examples of correct code for this rule:

<Spinner
    {...props} 
    aria-label="my screen reader text"
    aria-live="polite"
/>

@Harsh-Modi278 Harsh-Modi278 marked this pull request as ready for review September 16, 2024 13:02
@Harsh-Modi278
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Collaborator

@aubreyquinn aubreyquinn left a comment

Choose a reason for hiding this comment

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

Excellent work, Harsh! Just two comments on there.

@aubreyquinn aubreyquinn merged commit ca0e89d into microsoft:main Sep 17, 2024
4 checks passed
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.

2 participants