[Programmatic Access - Make code - Home] HTML document has no lang attribute.
User Experience:
If, the language of a webpage is not specified, the screen reader assumes the default language set by the user. It is essential to specify a language and ensure that it is valid, so website text is pronounced correctly.
Note: User credentials should NOT be included in the bug.
Repro-Steps:
- Open URL: https://arcade.makecode.com/blocks/on-start with valid credentials.
- Navigate the page.
- Run Accessibility Insights Tool.
- Verify the issue that HTML document has lang attribute or not.
Actual Result:
No Language attribute is defined in the page due to this a screen reader will face difficulty to understand the language of element contents and attributes value.
Expected result:
Language attribute should be defined in the page this will help screen reader user to understand the language of element contents and attributes value.
MAS Reference:
Title: WCAG 3.1.1: Ensures every HTML document has a lang attribute (html) Tags: Accessibility, WCAG 3.1.1, html-has-lang
Issue: Ensures every HTML document has a lang attribute (html-has-lang - https://accessibilityinsights.io/info-examples/web/html-has-lang)
Target application: On Start - https://arcade.makecode.com/blocks/on-start
Element path: html
Snippet: html lang="" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
How to fix: Fix any of the following: The element does not have a lang attribute.
Environment: Chrome version 121.0.0.0
====
This accessibility issue was found using Accessibility Insights for Web 2.41.0 (axe-core 4.7.2), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
#Accessibility;#A11yMAS;#A11yAuto;#K4W;#A11ySev2;#HCL;#Benchmark;#Win11-Chrome;#E2E-HCL-MakeCode-Jan2024;#MAS3.1.1
As checked the issue on URL: https://makecode.microbit.org/. The issue is still repro and severity is fine. #Regressed:04-08-24;InternalReviewed-Apr2024