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

aria-labelledby attribute in default theme causes error in W3C validator #2273

Closed
1 task done
lancea-tech opened this issue Apr 2, 2020 · 3 comments
Closed
1 task done
Labels
has PR Has a related PR type: bug Something isn't working

Comments

@lancea-tech
Copy link

  • I confirm that this is an issue rather than a question.

Bug report

aria-labelledby attribute in default theme causes following error in W3C validator:

Error: The aria-labelledby attribute must point to an element in the same document.

themeConfig:

    themeConfig: {
        search: false,
        sidebar: false,
        logo: '/logo.svg',
        nav: [
            { text: 'Strona Główna', link: '/' },
            { text: 'Usługi', link: '/services/' },
            { text: 'O nas', link: '/about/' },
            { text: 'Kontakt', link: '/contact/' }
        ]
    },

Steps to reproduce

  1. Create a VuePress site using themeConfig as above (or similar).
  2. Run W3C validator.

Validator against original theme:
https://validator.w3.org/nu/?doc=https%3A%2F%2Ftesting.lancea.pl%2F

Validator against corrected theme:
https://validator.w3.org/nu/?doc=https%3A%2F%2Flancea.pl%2F

Error was corrected by manually removing

aria-labelledby="main-title"

line from Home.vue (in ejected default theme from VuePress v1.4.0). No side effects observed.

What is expected?

No validation errors when using VuePress with default theme.

What is actually happening?

There are validation error.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vuepress/core: Not Found
    @vuepress/theme-default: Not Found
    vuepress: ^1.4.0 => 1.4.0
  npmGlobalPackages:
    vuepress: Not Found
  • theme
@billyyyyy3320 billyyyyy3320 added the type: bug Something isn't working label Apr 4, 2020
@billyyyyy3320
Copy link
Collaborator

billyyyyy3320 commented Apr 4, 2020

Thanks for the report.

I assumed that you've disabled the homepage title.

@lancea-tech
Copy link
Author

lancea-tech commented Apr 4, 2020

@newsbielt703 Yup, it's just heroImage on main page, with heroText: null.

@lancea-tech
Copy link
Author

Cherry-picked the fix, works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Has a related PR type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants