wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Incorrect capitalization of “YouTube” in aria‑label generated by LazyLoad

Open worldwildweb opened this issue 6 months ago • 0 comments

Describe the bug

When LazyLoad → Enable for iframes and videos is enabled, WP Rocket replaces embedded YouTube iframes with a placeholder <button class="play"> element. The element’s aria-label attribute reads "Play Youtube video"—the lowercase t in Youtube violates the correct brand capitalization "YouTube". Automated accessibility testing tools (e.g., Silktide) flag this as an accessibility/spelling error.

To Reproduce

  1. In WordPress admin, go to Settings ▸ WP Rocket ▸ Media.

  2. Tick Enable for iframes and videos under LazyLoad.

  3. Ensure a standard YouTube <iframe> is present in a post/page.

  4. View the page on the front end.

  5. Inspect the placeholder play button:

    <button class="play" aria-label="Play Youtube video" data-rocket-onclick="this.rocketonclick(event)"></button>
    
  6. Note the lowercase “t” in “Youtube”.

Expected behavior

The aria‑label should use correct brand capitalization:

<button class="play" aria-label="Play YouTube video" data-rocket-onclick="this.rocketonclick(event)"></button>

Screenshots / Code

<!-- Current output -->
<button class="play" aria-label="Play Youtube video" data-rocket-onclick="this.rocketonclick(event)"></button>

<!-- Expected -->
<button class="play" aria-label="Play YouTube video" data-rocket-onclick="this.rocketonclick(event)"></button>

Desktop (please complete where applicable)

  • OS: [e.g., macOS 14.3]
  • Browser: [e.g., Chrome 125]
  • WP Rocket version: [e.g., 3.16.0]
  • WordPress version: [e.g., 6.5.3]

Smartphone (please complete where applicable)

  • Device: [e.g., iPhone 15]
  • OS: [e.g., iOS 17.5]
  • Browser: [e.g., Safari]

Additional context

  • Accessibility test run with Silktide.

Possible fix

worldwildweb avatar Jun 13 '25 07:06 worldwildweb