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

HTML Validation: Personal settings #40983

Merged
merged 7 commits into from
Oct 20, 2023

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Oct 19, 2023

Summary

This PR fixes a number of small HTML validation issues on the Personal settings page.

See by commits.

Error: Bad value for attribute aria-describedby on element input: An IDREFS value must contain at least one non-whitespace character.

fix(settings): remove empty aria-describedby
Empty string '' was set when there is no ID. But empty string is still rendered in Vue and is not a valid ID. Replaced with undefiend.

No visual changes.

Before:

image

After:

image

Error: The value of the for attribute of the label element must be the ID of a non-hidden form control.

fix(settings): fix ids and aria-labels in personal emails

Email elements had different ways to assign IDs and additional emails had no labels at all.

Now it is passed the same way as in other sections.

image

Error: Attribute disabled-menu not allowed on element div at this point.

fix(settings): remove invalid avatar prop
There was a typo, it must have been disable-menu, not disableD-menu.
But it is not required because the menu is disabled for the current user anyway.

No visual changes:

image

Error: Attribute disabled-tooltip not allowed on element div at this point.

fix(settings): typo in avatar prop
disabled-tooltip -> disable-tooltip

Error: Attribute placeholder not allowed on element select at this point.

fix(settings): remove placeholder from select.

<select> doesn't support placeholder in HTML

No visual changes:

image

Error: Attribute handle-scope-change not allowed on element div at this point.

fix(settings): remove unused savePrimaryEmailScope on Personal Settings page

If was replaced with universal savePrimaryAccountPropertyScope before already. This method was unused and <HeaderBar> has no handle-scope-change prop.

Just removed.

email

Checklist

@ShGKme ShGKme self-assigned this Oct 19, 2023
@ShGKme ShGKme force-pushed the fix/37092/personal-settings--html-validation branch from e44ebd3 to 836f369 Compare October 19, 2023 17:16
@ShGKme ShGKme added this to the Nextcloud 28 milestone Oct 19, 2023
@ShGKme ShGKme marked this pull request as ready for review October 19, 2023 17:18
Empty string `''` is still rendered and is not a valid ID.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
There was a typo, it must have been disable-menu, not disableD-menu.
But it is not required, because the menu is disabled for the current user anyway.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
There is no placeholder attribute on select element

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
…gs page

If was replaced with universal `savePrimaryAccountPropertyScope`.
`<HeaderBar>` has no `handle-scope-change` prop.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@susnux susnux force-pushed the fix/37092/personal-settings--html-validation branch from 836f369 to 7c142c9 Compare October 20, 2023 18:34
@susnux susnux merged commit b0956b1 into master Oct 20, 2023
39 checks passed
@susnux susnux deleted the fix/37092/personal-settings--html-validation branch October 20, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants