Skip to content

[Fix] Replace obsolete frameborder attribute on iframes with CSS border property #291

Description

@qmoreaux

I want to prequalify a pull request related to the following:

User story:
As a web developer integrating H5P, I want the generated iframe markup to follow current HTML standards so that automated accessibility tools do not flag unnecessary warnings.

Currently, H5P iframes include the obsolete frameborder="0" attribute, which is not part of the HTML5 specification and triggers warnings in tools like axe, WAVE, and Lighthouse.

UX:
No visible changes. The iframe will render identically.

Accessibility:
While not a direct WCAG violation, removing deprecated attributes contributes to cleaner, standards-compliant markup. This supports:

  • RGAA 10.1: no deprecated presentational attributes.
  • General best practice for HTML5 compliance.

Technical solution:

  1. In h5p.js and h5p-resizer.js (or wherever iframes are generated), remove the frameborder="0" attribute from iframe creation.

  2. Add border: none; to the inline style or to the CSS stylesheet applied to H5P iframes (h5p.css).

  3. Search for all occurrences of "frameborder" across the codebase to ensure complete cleanup.

This is a minimal, low-risk change with no functional impact.

Files likely affected:

  • js/h5p.js
  • js/h5p-resizer.js
  • styles/h5p.css

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions