If editor screen uses tabs in form display, checker only sees current tab

Created on 16 May 2025, 21 days ago

Problem/Motivation

When editing a content type where the form display includes Tabs (tab widget), the checker only checks the current tab. This leads to a confusing experience when an author sees errors when viewing a page, then, when editing, the checker shows no errors. It's not intuitive that the author has to click on each tab to find one that has an error. The checker will only show the error if you switch to the tab that has the error.

Steps to reproduce

  1. Modify a content type form display to have a "Tabs" field group and at least two tabs. Move some fields to the second tab.
  2. Create an accessibility error in a field that is in the second tab (which will not show initially when you edit the page).
  3. View the page to trigger the checker and see that you have an error. Click "edit" to edit the page.
  4. The checker now says there is no error.
  5. Change to the second tab while editing. The checker now shows an error. If you switch back to the first tab, the checker shows no errors.

Proposed resolution

While editing a page that has tabs, show the same errors that you would see on the "view" of a page.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.2

Component

Bugs

Created by

πŸ‡ΊπŸ‡ΈUnited States joeg8612

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @joeg8612
  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Yes; I agree that this is confusing in the UI at the moment.

    It looks like it would be possible (though complicated) to modify the library to check inside closed tabs provided by the Field Group module β†’ , as that module does render the field content in the DOM even when hidden. I would need to modify some of the parameters at runtime so that it does not ignore these hidden elements, would need to add a function to hide the tip toggles from results in any hidden tabs, and add a function to ask Drupal to switch tabs and then rerender my results with a different set of hidden tip toggles if someone hits "next" into an alert on the hidden tab.

    It looks like it would not be possible to modify the library to check inside closed Paragraph β†’ tabs, as Paragraphs does not render the DOM until a tab is opened.

    I'm...honestly not sure what makes sense to do here. I'm trying to be consistent, so I do not like the idea of the module working notably different depending on the fields present on a content type. And Princeton does not put CK content inside Field Group tabs, so I am not sure they would want to sponsor the amount of work involved in something for only that use case.

  • πŸ‡ΊπŸ‡ΈUnited States joeg8612

    Thanks for checking this out. To avoid confusion in the short term, the best option for us will be to disable showing the Editoria11y component when authors are editing a page. I'm having some trouble figuring out the best way to do that. Is the only way to do that by modifying this configuration parameter - Hide all alerts if none of these elements are present?

    It seems that options to disable the scanner or not check content while it's being edited don't affect the display of the component.

    Thanks.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Oh goodness; neither config is working right any more. I will try to get a release out tomorrow with bugfixes.

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj

    Config to turn off checker while editing should work correctly in 2.2.9 β†’ .

  • πŸ‡ΊπŸ‡ΈUnited States joeg8612

    Thanks very much for your fix itmaybejj! Our authors love Editoria11y!

  • πŸ‡ΊπŸ‡ΈUnited States itmaybejj
    • itmaybejj β†’ committed 06583aa1 on 2.2.x-dev
      Issue #3525014 by joeg8612, itmaybejj: If editor screen uses tabs in...
Production build 0.71.5 2024