Skip to content

feat: HTML lang attribute - #53

Merged
lukin merged 3 commits into
lukin:masterfrom
paulwer:patch-2
Oct 4, 2023
Merged

lukin merged 3 commits into
lukin:masterfrom
paulwer:patch-2

Conversation

@paulwer

@paulwer paulwer commented Sep 22, 2023 •

Copy link
Copy Markdown
Contributor

As within file:
https://github.com/keycloak/keycloak/blob/main/themes/src/main/resources/theme/base/login/template.ftl

Keycloak sets the html default language tag to the current language, which can be usefull for screen readers or additional plugins.

keycloak/keycloak@4036324#diff-8f5ce48097e1dfc8ce6ebfc5b0c4f1a387d40cfe4abe8bde76da550e09574256

@lukin lukin changed the title Add html language tag - according to keycloak default Add HTML lang attribute Sep 25, 2023
@lukin

lukin commented Sep 25, 2023

Copy link
Copy Markdown
Owner

Hey @paulwer 👋

Thank you for all of your contributions. I'll merge this soon after updating the tests and will look at the rest of the pull requests afterwards.

@paulwer paulwer changed the title Add HTML lang attribute feat: HTML lang attribute Sep 26, 2023
@paulwer

paulwer commented Sep 28, 2023

Copy link
Copy Markdown
Contributor Author

@lukin i guess the attribute should also be added within the test-files? should I add another commit including this?

f.ex. in https://github.com/lukin/keywind/blob/master/html/login/error.html
like:

<html lang="en">
  <head>
         [ ... ]
  </head>
  <body class=" ... ">
        [ ... ]
  </body>
</html>

@maxsivkov

Copy link
Copy Markdown

Hello

Should we also think about RTL languages (Arabic, Hebrew, Persian...)?
I'm not sure all browsers will respect lang attribute in the meaning of text direction

Currently I want to extend template.ftl and introduce dir attribute to the html tag

@paulwer

paulwer commented Oct 3, 2023

Copy link
Copy Markdown
Contributor Author

@maxsivkov I suggest you to create an pr or issue for this topic seperatly <3

@lukin

lukin commented Oct 4, 2023

Copy link
Copy Markdown
Owner

I apologize for my delayed response. From today, I will start a review of all these exciting changes. 🙂

I haven't had the chance to create the tests documentation yet, but here's a summary. When you run the mvn test command, it verifies the FreeMarker templates and automatically updates the HTML pages, which currently serve as snapshots. This enables a quick review of any modifications made on all the relevant pages without starting the Keycloak server. In the future, I intend to include these tests in the CI pipeline.

@lukin
lukin merged commit 9beadbe into lukin:master Oct 4, 2023
@paulwer
paulwer deleted the patch-2 branch October 5, 2023 05:05
@paulwer

paulwer commented Oct 5, 2023

Copy link
Copy Markdown
Contributor Author

very nice. thank you <3

lukin added a commit that referenced this pull request Oct 24, 2023
Co-authored-by: Anthony Lukin <anthony@lukin.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants