Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing html error in the admin UI (Lombiq Technologies: OCORE-87) #11425

Merged
merged 9 commits into from
Mar 30, 2022

Conversation

BanzragchUchral
Copy link
Contributor

@BanzragchUchral BanzragchUchral commented Mar 22, 2022

I was writing a UI test for one of our Lombiq modules, and I came across some UI errors/warnings in the admin page.

I am attaching the validation report, and here are the rules which got validated:

HtmlValidationReport.txt

Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run it though the https://validator.w3.org/ validator as well, please.

src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml Outdated Show resolved Hide resolved
src/OrchardCore.Themes/TheAdmin/wwwroot/css/TheAdmin.css Outdated Show resolved Hide resolved
src/OrchardCore.Themes/TheAdmin/wwwroot/css/TheAdmin.css Outdated Show resolved Hide resolved
Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but actually, not the W3C validator, but please run it through html-validate (it's a CLI tool, you can just use it with local files) so we can get the consistent results. Doesn't it show anything new?

@BanzragchUchral
Copy link
Contributor Author

I wasn't running it properly before. I found some mistakes, and most errors in the "UserMenu.cshtml" and "Layout. cshtml" should be fixed.

I didn't find any error in the Admin.css.

UserMenu:

  • Attribute "class" duplicated
  • Attribute "asp-route-returnurl" should be lowercase
  • <button> is missing required "type" attribute

Layout:

  • <resources> must not be self-closed
  • <button> is missing required "type" attribute
  • Anchor link must have a text describing its purpose

@Piedone Piedone merged commit ee83d32 into OrchardCMS:main Mar 30, 2022
@@ -65,7 +67,9 @@
<div id="ta-left-sidebar" class="d-flex flex-column justify-content-between align-items-stretch">
@await RenderSectionAsync("Navigation", required: false)
<div class="footer">
<button class="leftbar-compactor" type="button" title="@T["Collapse / expand menu"]"></button>
<button type="button" class="leftbar-compactor" title="@T["Collapse / expand menu"]">
<span>@T["Collapse / expand menu"]</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time use class="d-none"

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.

4 participants