canonical.com icon indicating copy to clipboard operation
canonical.com copied to clipboard

HTML Compliance and Accessibility Improvements (1st Round)

Open AslanGM opened this issue 1 year ago • 1 comments

Done

  • Removed redundant aria-hidden attribute from hidden inputs
  • Added role attribute to dropdown div for improved accessibility
  • Removed not allowed 'maxlength' from hidden inputs
  • Updated aria-describedby attribute for modal dialog to point to existing element
  • Fixed aspect-ratio value to 554 / 107 in CSS
  • Replaced space in image URL with %20 for proper encoding
  • Modified the 'loading' attribute to adhere to specification

QA

Since the changes are on localhost and can't be validated directly via W3C Validator, I have manually checked the HTML for compliance. Recommend further verification in a staging environment where the site is publicly accessible or using the "Validate by Direct Input" option on W3C Validator.

Issue / Card

None

Screenshots

The attached screenshots were taken from the W3C Validator. For your reference, you can check the validation results for the Homepage, the Press Center page and the Projects page.

Dropdown role attribute: Showing results for https:::canonical com: - Nu Html Checker 2023-10-19 17-39-14

Redundant aria-hidden attribute from hidden inputs (it appears in many files): Showing results for https:::canonical com: - Nu Html Checker 2023-10-19 17-39-34

Not allowed 'maxlength' from hidden inputs: Showing results for https:::canonical com: - Nu Html Checker 2023-10-19 17-40-06

Aria-describedby attribute for modal dialog to point to existing element: Showing results for https:::canonical com: - Nu Html Checker 2023-10-19 17-40-19

Incorrect aspect-ratio value: Showing results for https:::canonical com:press-centre - Nu Html Checker 2023-10-19 17-41-00

Image issues on the Press Centre page: Showing results for https:::canonical com:projects - Nu Html Checker 2023-10-19 17-43-10

[if relevant, include a screenshot]

About W3C Validator:

W3C Validator may report errors like "Malformed byte sequence." These errors can sometimes vanish after a multiple page refresh or time. I guess that these issues might be linked to encoding problems coming from the backend. NOTE: when "Malformed byte sequence" errors appear, all other HTML errors are not displayed.

Please feel free to review and let me know your thoughts on having multiple commits within a single request for better organization.

AslanGM avatar Oct 19 '23 11:10 AslanGM

AslanGM is not a collaborator of the repo

webteam-app avatar Oct 19 '23 11:10 webteam-app