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

Duplicate ids on same page #19108

Open
M393 opened this issue Apr 10, 2024 · 1 comment
Open

Duplicate ids on same page #19108

M393 opened this issue Apr 10, 2024 · 1 comment
Labels
good first issue newbie ui Issues relating to the user interface

Comments

@M393
Copy link
Contributor

M393 commented Apr 10, 2024

Describe the bug

All id values should be unique per page.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id

To Reproduce

Steps to reproduce the behavior:

  1. Browse a table (or other pages)
  2. Execute this script in the developer tools, should return an empty array (no duplicate ids)
Object.values(
    Array.from(document.querySelectorAll('[id]'))
        .reduce(
            (all, n) => {
                if (!(n.id in all)) {
                    all[n.id] = [];
                }
                all[n.id].push(n);
                return all;
            }, 
            {}
        )
).filter((l) => l.length > 1);

Expected behavior

All ids should be used only once per page, if a selector has to match multiple elements, use classes instead.

Server configuration

  • phpMyAdmin version: 5.2 / 6

Client configuration

  • Browser: Chrome
  • Operating system: Windows 10
@williamdes williamdes added good first issue newbie ui Issues relating to the user interface labels Apr 28, 2024
@enochval
Copy link

enochval commented May 2, 2024

@williamdes can I work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue newbie ui Issues relating to the user interface
Projects
None yet
Development

No branches or pull requests

3 participants