HTML: Add language attribute

Message ID 20220424104316.407-1-hofmann@leo-andres.de
State Accepted
Commit cdf0522ec2b944ce0b6aac5d6baa49c96930d660
Headers
Series HTML: Add language attribute |

Commit Message

Leo-Andres Hofmann April 24, 2022, 10:43 a.m. UTC
  This attribute is recommended by W3C, because it is used by
screen readers to provide the correct pronunciation.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
---
 html/html/themes/ipfire/include/functions.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Peter Müller April 24, 2022, 2:04 p.m. UTC | #1
Thank you for giving the web interface some love and care. :-)

Reviewed-by: Peter Müller <peter.mueller@ipfire.org>

> This attribute is recommended by W3C, because it is used by
> screen readers to provide the correct pronunciation.
> 
> Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
> ---
>  html/html/themes/ipfire/include/functions.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl
> index d74c962e4..8485996a2 100644
> --- a/html/html/themes/ipfire/include/functions.pl
> +++ b/html/html/themes/ipfire/include/functions.pl
> @@ -117,7 +117,7 @@ sub openpage {
>  
>  print <<END;
>  <!DOCTYPE html>
> -<html>
> +<html lang="$language">
>  	<head>
>  	<title>$headline - $title</title>
>  	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  

Patch

diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl
index d74c962e4..8485996a2 100644
--- a/html/html/themes/ipfire/include/functions.pl
+++ b/html/html/themes/ipfire/include/functions.pl
@@ -117,7 +117,7 @@  sub openpage {
 
 print <<END;
 <!DOCTYPE html>
-<html>
+<html lang="$language">
 	<head>
 	<title>$headline - $title</title>
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>