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

XWIKI-21772: Admin section: make user directory pass webstandard tests #2795

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Rights
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=usersgroups.extensionrights
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=UserProfile
<!--/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=userdirectory
TODO https://jira.xwiki.org/browse/XWIKI-21772 -->
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=userdirectory
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=Registration
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=Invitation
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,12 +1160,16 @@ public void validateRpd13s1()
if (id != null) {
// Looking for the label associated to the input.
boolean hasLabel = false;
for (Element label : getElement(ELEM_BODY).getElementsByTag("label")) {
String labelTagName = "label";
for (Element label : getElement(ELEM_BODY).getElementsByTag(labelTagName)) {
if (id.equals(label.attr("for"))) {
hasLabel = true;
break;
}
}
// From MDN webdocs: Alternatively, you can nest the <input> directly inside the <label>,
// in which case the for and id attributes are not needed because the association is implicit
hasLabel = hasLabel || input.parent().tag().getName().equals(labelTagName);
assertTrue(Type.ERROR, message, hasLabel);
}
}
Expand Down
Loading