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

Remove collaborator card heading #2113

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Remove collaborator card heading #2113

merged 2 commits into from
Apr 11, 2023

Conversation

davidjray
Copy link
Contributor

Swap default SLDS <card> react component with basic SLDS markup to remove an out of place H2. This is to fix an accessibility issue with confusing heading order.

In addition, I also fixed another potential issue, with each collaborator listed having the same title of "Remove", this would be confusing for users, so I made sure each button specifies which user would be deleted. This change required a simple update to the test.

…lace H2 to fix accessibility issue with confusing heading order
@davidjray davidjray requested a review from a team as a code owner April 11, 2023 22:20
fireEvent.click(getByTitle('Remove'));
fireEvent.click(
getByTitle(
`Remove ${sampleGitHubUser2.name} (${sampleGitHubUser2.login})`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see the stuff in parentheses in the title:

      `Remove ${sampleGitHubUser2.name} (${sampleGitHubUser2.login})`,

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, name is set above on line 23:

let name: string | JSX.Element = user.name
    ? `${user.name} (${user.login})`
    : user.login;

@prescod prescod merged commit 1efa298 into main Apr 11, 2023
5 checks passed
@prescod prescod deleted the feature/a11y-githubuser-card branch April 11, 2023 22:58
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.

None yet

2 participants