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

fix: remove role attribute when it's null or undefined #4137

Merged
merged 3 commits into from
Sep 20, 2023

Conversation

DAreRodz
Copy link
Contributor

Fixes #4136.

Most browsers now implement the attributes defined in the ARIAMixin interface, which includes Element.role. In such a case, the current code assigns an empty string to the role property when it's null or undefined instead of removing it.

This PR prevents that so the role prop can be removed as normal.

@github-actions
Copy link

github-actions bot commented Sep 20, 2023

📊 Tachometer Benchmark Results

Summary

A summary of the benchmark results will show here once they finish.

Results

The full results of your benchmarks will show here once they finish.

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

coveralls commented Sep 20, 2023

Coverage Status

coverage: 99.294%. remained the same when pulling eb367fe on DAreRodz:fix-role-attribute-removal into 7dc66bc on preactjs:main.

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@JoviDeCroock JoviDeCroock merged commit 64be3cb into preactjs:main Sep 20, 2023
13 checks passed
@DAreRodz DAreRodz deleted the fix-role-attribute-removal branch September 20, 2023 09:58
@JoviDeCroock JoviDeCroock mentioned this pull request Sep 28, 2023
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.

It is not possible to remove the role attribute which results in invalid HTML
3 participants