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

Add HTML rule "Avoid autoplay for videos and audio content" #298

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

utarwyn
Copy link
Member

@utarwyn utarwyn commented May 4, 2024

Hello, I want to propose a new rule in the ecoCode repository. You can find its declaration below.
This new rule will mark the inauguration of the HTML plugin 🎉, so I've created the assembly configuration for this language.

Platform

HTML and JavaScript (React / JSX) in the future

Main caracteristics

ID Title Category
EC36 Avoid autoplay for videos and audio content Network, Power consumption

Severity / Remediation Cost

I propose a remediation cost of 5min per audio/video element, in order to remove the autoplay attribute.

Severity Remediation Cost
Major 5min

Rule complete description

Check asciidoc in the PR content.

Implementation principle

  • Check for autoplay/preload attributes in <audio /> and <video /> elements

@utarwyn utarwyn added the 🗃️ rule rule improvment or rule development or bug label May 4, 2024
@utarwyn utarwyn requested a review from a team May 4, 2024 11:34
@utarwyn utarwyn self-assigned this May 4, 2024
@utarwyn utarwyn changed the title Add HTML rule "Avoid usage of autoplay attribute in audio and video elements" Add HTML rule "Avoid autoplay for videos and audio content" May 4, 2024
@Djoums
Copy link
Contributor

Djoums commented May 5, 2024

Rule looks good, but why is the whole table in RULES.md flagged as diff ?

@utarwyn
Copy link
Member Author

utarwyn commented May 5, 2024

@Djoums
Rule looks good, but why is the whole table in RULES.md flagged as diff ?

I have added a column for the HTML language

@Djoums
Copy link
Contributor

Djoums commented May 5, 2024

Ha right, I didn't expect html to share the same table as the other languages actually, but I guess that's fine while we wait for the web site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗃️ rule rule improvment or rule development or bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants