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

VACMS-19377: Fix tabbing for content editor menus. #19864

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

anantais
Copy link
Contributor

Description

Closes #19377

Testing done

Screenshots

QA steps

When logged in to the Drupal backend, start to tab through the main menus with your keyboard (content, structure, etc).
The tabbing should work on the main menus but require you to hit enter to tab in to submenus.

As user uid with user_role

Tab through Drupal back end menus
Hit enter to enter a sub menu.
If you do not hit enter you should remain in the top level menu when tabbing

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 12, 2024 21:00 Destroyed
Copy link

Checking composer.lock changes...

@github-actions github-actions bot added the CMS Team CMS Product team that manages both editor exp and devops label Nov 12, 2024
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 13, 2024 09:05 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 13, 2024 18:11 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 13, 2024 19:01 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 13, 2024 19:56 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 13, 2024 21:08 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 09:03 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 16:38 Destroyed
Copy link

Checking composer.lock changes...

@anantais anantais force-pushed the VACMS-19377-defect-3---critical---menu-systems-2 branch from d53e97b to 0fea195 Compare November 14, 2024 18:23
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 18:23 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 18:44 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 18:47 Destroyed
@anantais anantais force-pushed the VACMS-19377-defect-3---critical---menu-systems-2 branch from 49020f4 to 70394a9 Compare November 14, 2024 18:51
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 18:51 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 14, 2024 19:03 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot
Copy link
Collaborator

Accessibility Violations Found:

[
  {
    "route": "/test-data-sapiente",
    "id": "button-name",
    "impact": "critical",
    "tags": [
      "cat.name-role-value",
      "wcag2a",
      "wcag412",
      "section508",
      "section508.22.a",
      "ACT",
      "TTv5",
      "TT6.a"
    ],
    "description": "Ensures buttons have discernible text",
    "help": "Buttons must have discernible text",
    "helpUrl": "https://dequeuniversity.com/rules/axe/4.7/button-name?application=axeAPI",
    "nodes": [
      {
        "any": [
          {
            "id": "button-has-visible-text",
            "data": null,
            "relatedNodes": [],
            "impact": "critical",
            "message": "Element does not have inner text that is visible to screen readers"
          },
          {
            "id": "aria-label",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-label attribute does not exist or is empty"
          },
          {
            "id": "aria-labelledby",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty"
          },
          {
            "id": "non-empty-title",
            "data": {
              "messageKey": "noAttr"
            },
            "relatedNodes": [],
            "impact": "serious",
            "message": "Element has no title attribute"
          },
          {
            "id": "presentational-role",
            "data": null,
            "relatedNodes": [],
            "impact": "minor",
            "message": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
          }
        ],
        "all": [],
        "none": [],
        "impact": "critical",
        "html": "<button class=\"proofing-element-help\" role=\"tooltip\" data-proofing-help-title=\"About 'Page introduction' field\" data-proofing-help=\"Add an introduction that helps visitors understand if information on the page is relevant to them.\">
          <span aria-hidden=\"true\">i</span>
        </button>",
        "target": [
          ".field--name-field-intro-text-limited-html > .field__label > .proofing-element-help[role=\"tooltip\"]"
        ],
        "failureSummary": "Fix any of the following:
  Element does not have inner text that is visible to screen readers
  aria-label attribute does not exist or is empty
  aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
  Element has no title attribute
  Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
      },
      {
        "any": [
          {
            "id": "button-has-visible-text",
            "data": null,
            "relatedNodes": [],
            "impact": "critical",
            "message": "Element does not have inner text that is visible to screen readers"
          },
          {
            "id": "aria-label",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-label attribute does not exist or is empty"
          },
          {
            "id": "aria-labelledby",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty"
          },
          {
            "id": "non-empty-title",
            "data": {
              "messageKey": "noAttr"
            },
            "relatedNodes": [],
            "impact": "serious",
            "message": "Element has no title attribute"
          },
          {
            "id": "presentational-role",
            "data": null,
            "relatedNodes": [],
            "impact": "minor",
            "message": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
          }
        ],
        "all": [],
        "none": [],
        "impact": "critical",
        "html": "<button class=\"proofing-element-help\" role=\"tooltip\" data-proofing-help-title=\"About 'Generate a table of contents from major headings' field\" data-proofing-help=\"By checking this box, all h2's below this point on the page will be linked with with anchor links. This helps users navigate content on very long pages. Do not check this box unless there is at least 2 h2's on the page.\">",
        "target": [
          ".field--name-field-table-of-contents-boolean > .field__label > .proofing-element-help[role=\"tooltip\"]"
        ],
        "failureSummary": "Fix any of the following:
  Element does not have inner text that is visible to screen readers
  aria-label attribute does not exist or is empty
  aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
  Element has no title attribute
  Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
      },
      {
        "any": [
          {
            "id": "button-has-visible-text",
            "data": null,
            "relatedNodes": [],
            "impact": "critical",
            "message": "Element does not have inner text that is visible to screen readers"
          },
          {
            "id": "aria-label",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-label attribute does not exist or is empty"
          },
          {
            "id": "aria-labelledby",
            "data": null,
            "relatedNodes": [],
            "impact": "serious",
            "message": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty"
          },
          {
            "id": "non-empty-title",
            "data": {
              "messageKey": "noAttr"
            },
            "relatedNodes": [],
            "impact": "serious",
            "message": "Element has no title attribute"
          },
          {
            "id": "presentational-role",
            "data": null,
            "relatedNodes": [],
            "impact": "minor",
            "message": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
          }
        ],
        "all": [],
        "none": [],
        "impact": "critical",
        "html": "<button class=\"proofing-element-help\" role=\"tooltip\" data-proofing-help-title=\"About 'Main content' field\" data-proofing-help=\"The main body of the page, which appears below the featured content.\">
          <span aria-hidden=\"true\">i</span>
        </button>",
        "target": [
          "button[data-proofing-help-title=\"About 'Main content' field\"]"
        ],
        "failureSummary": "Fix any of the following:
  Element does not have inner text that is visible to screen readers
  aria-label attribute does not exist or is empty
  aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
  Element has no title attribute
  Element's default semantics were not overridden with role=\"none\" or role=\"presentation\""
      }
    ]
  }
]

@srancour
Copy link
Contributor

srancour commented Nov 15, 2024

So some interesting issues I found while testing that PR:

  • When collapsing the screen down to where the menu reflows onto two lines the dropdown button still shows over the menu that’s open
    • Screenshot of the VA tools menu open with a dropdown button showing up over it
  • The button is changing names on press instead of doing like the Sections dropdowns do where the name of the button stays the same and the button uses the aria-expanded attribute. I would suggest changing the name to be {nameOfMenu} sub menu
    • Menu button code
      • closed: Extend Tools
      • open: Collapse Tools
    • Sections button code
      • closed:
      • open:
  • On mouse hover the button isn’t switching or firing the open state so it doesn’t look open and a screen reader user won’t get the knowledge that it’s open.
    • Screenshot of the VA tools menu open with the dropdown button showing closed
  • In the open state, there is no way to cancel the close after pressing on it with a mouse, where there is a way to cancel it when it’s closed, thus breaking WCAG 2.5.2: Pointer Cancellation (Level A)
  • When a menu gets opened up from a press, it doesn’t close when any of the parent menus closes. It’s not particularly an accessibility issue, but it makes for a bad experience.
  • Interesting bug I discovered is when you are tabbing through, if you have the mouse hovering over a menu, it will tab through what’s visible, which is as it should be, but if you move the hover off the menu and then tab again, it throws the tab to the top of the page, which is really bad.
  • The color contrast of the dropdown arrow when focused doesn’t meet color contrast just barely (2.9:1 instead of 3:1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMS Team CMS Product team that manages both editor exp and devops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defect 3 - Critical - Menu Systems
3 participants