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

name not allowed on a li element #214

Closed
daniel-montalvo opened this issue Oct 31, 2023 · 16 comments · Fixed by #219
Closed

name not allowed on a li element #214

daniel-montalvo opened this issue Oct 31, 2023 · 16 comments · Fixed by #219
Assignees

Comments

@daniel-montalvo
Copy link
Contributor

Ref: https://validator.w3.org/nu/?showsource=yes&doc=https%3A%2F%2Fw3c.github.io%2Faccname%2F

The HTML checker complains that there is a name attribute on a li element. Can we use another method for this that passes the HTML validator?

@pkra
Copy link
Member

pkra commented Nov 2, 2023

They don't appear to be used for anything.

Looking at 9c71070, it seems like they were left in place by @cookiecrook during #186. Maybe to facilitate review or perhaps for historical value? In the latter case, we could add a data-historical- prefix.

@daniel-montalvo
Copy link
Contributor Author

Thanks for this detailed explanation, @pkra

If @cookiecrook does not object, I'm happy to take this on. I am taking an overall pass at most of the ARIA modules to make them ready for transition to next maturity level.

@daniel-montalvo daniel-montalvo self-assigned this Nov 2, 2023
@daniel-montalvo
Copy link
Contributor Author

According to @jnurthen this was left for old links to keep working. One can do https://github.io/accname/#step1 and be taken to the "Initialization" step under the "Text Equivalent Computation" section.

@pkra
Copy link
Member

pkra commented Nov 2, 2023

According to @jnurthen this was left for old links to keep working. One can do https://github.io/accname/#step1 and be taken to the "Initialization" step under the "Text Equivalent Computation" section.

It doesn't though -- only for a tags. Putting the names on some anchors in the list items should work though.

@cookiecrook
Copy link
Contributor

cookiecrook commented Nov 2, 2023

Yes. Ideally we'll need to leave non-linked anchors so that older incoming links don't break:

<li id="newNamedStepID">
  <a name="oldNumberedStepName">Labelledby:</a>
  etc etc
</li>

@cookiecrook
Copy link
Contributor

Cool URIs don't change (or break)
https://www.w3.org/Provider/Style/URI

@cookiecrook
Copy link
Contributor

@w3c/aria-editors Should there be a GitHub hook to include validation as a PR check?

@daniel-montalvo
Copy link
Contributor Author

Not sure what we would check here in addition to what specprod already checks.

If you have a look at https://github.com/w3c/accname/actions/runs/6706842952 that is checking links and markup, including the HTML validator, which now fails on <li name="">

@cookiecrook
Copy link
Contributor

Ah. I didn't know it was already validating.

Now I'm wondering why that didn't get flagged on my original PR #186.

@daniel-montalvo
Copy link
Contributor Author

@cookiecrook We have a much lightweight set of linters for the PRs. I realized the other day because I wanted to make sure we could publish on TR, for winch markup validation and link checkers are compulsory.

@jnurthen jnurthen self-assigned this Nov 3, 2023
@jnurthen
Copy link
Member

jnurthen commented Nov 3, 2023

We can't use <a name> as respec will try to resolve these as references

@cookiecrook
Copy link
Contributor

We can't use <a name> as respec will try to resolve these as references

Do you have another resolution in mind? I suppose we could drop the old permalinks.

@cookiecrook
Copy link
Contributor

cookiecrook commented Nov 3, 2023

Oh I know. We can move the old numbered name to an id on the <em> that is the first child of each li

<li id="newNamedStepID">
  <em id="oldNumberedStepName">Labelledby:</em>
  etc etc
</li>

The <em> should already be there... Just move the attr to the firstChild and change the attr name from name to id.

@jnurthen
Copy link
Member

jnurthen commented Nov 3, 2023

I created a PR with empty spans with IDs - see above. Seems to validate fine and works

@jnurthen
Copy link
Member

jnurthen commented Nov 3, 2023

Oh I know. We can move the old numbered name to an id on the \<em\> that is the first child of each li

<li id="newNamedStepID">
  <em id="oldNumberedStepName">Labelledby:</em>
  etc etc

The \<em\> should already be there... Just move the attr to the firstChild and change the attr name from name to id.

Not every line with the name attributes has an em element to add it to. Decided adding a span and being consistent was more important

@cookiecrook
Copy link
Contributor

okay... let's continue in the PR

@accdc accdc closed this as completed in #219 Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants