Repository navigation
Label the page feedback comment box and set it apart from the reasons - #5020
Conversation
The comment box had only a placeholder, so readers lost its purpose once they typed and it ran into the reason checkboxes above it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| margin-top: 0.5rem; | ||
| border-top: 1px solid var(--color-grey-20); | ||
| padding-top: 1.5rem; |
There was a problem hiding this comment.
Severity: P3 (Low)
Add a browser-level regression check for the expanded feedback form. The existing textbox tests would pass with the old screen-reader-only label because the accessible name is unchanged, and the feedback browser journey never opens the form. Neither check would catch the visible label or divider disappearing.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Partly addressed in abcd3ee. A new Vitest case (shows a visible label above the comment field) fails when the React label goes back to sr-only or the placeholder returns. I confirmed it fails against the old markup. The ApiBetaBannerTests HTML snapshot now locks the Razor label markup. The divider is CSS only, and no committed check covers it. A journey would have to press Yes or No, which sends a PUT that read-only runs block, so the feedback journey stays render-only, as docs/development/journeys.md documents.
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5020/ |
With NAVIGATION_PREVIEW on, pages render the Razor feedback widget, which still hid the label and had no divider. A unit test now fails if the React widget's label goes back to screen-reader-only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| flex-direction: column; | ||
| gap: var(--space-2); | ||
| padding-top: var(--space-4); | ||
| border-top: var(--border-width) solid var(--color-border); |
There was a problem hiding this comment.
Severity: P3 (Low)
Removing this rule would leave the updated HTML snapshot and the new React test green, even though the design-system widget would lose its divider. Add a browser check that expands the design-system widget and verifies the separator between the reasons and the comment field.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Not adding a browser check here, because none could run. The design-system widget renders only with NAVIGATION_PREVIEW on. The journeys:test host removes every FEATURE_* variable before it starts the isolated site, and that site's docs:features tag lists only diagnostics-panel page-feedback. A feature navigation-preview block in a journey runs only when the site already has the flag, so it would skip on every run here. The Synthetics runs against deployed sites are read-only and refuse the PUT that pressing Yes or No sends. The ApiBetaBannerTests snapshot covers the markup. The divider rule stays without an automated check until the journeys can run a site with navigation-preview on.
Every other reason has a line of subtext. Another reason now has one too, and it points readers to the comment box for the details. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| expect( | ||
| screen.getByRole('checkbox', { name: /Another reason/ }) | ||
| ).toHaveAccessibleName( | ||
| /^Another reason\s*Something else helped\. Tell us more below\.$/ | ||
| ) | ||
|
|
||
| await user.click( | ||
| screen.getByRole('button', { | ||
| name: 'No, this page was not helpful', | ||
| }) | ||
| ) | ||
| expect( | ||
| screen.getByRole('checkbox', { name: /Another reason/ }) | ||
| ).toHaveAccessibleName( | ||
| /^Another reason\s*Something else went wrong\. Tell us more below\.$/ |
There was a problem hiding this comment.
Severity: P3 (Low)
Assert the visible subtext for each reaction, not just the checkbox’s accessible name. Both checks would still pass if the copy moved into an aria-label and disappeared from the form, leaving sighted readers without the prompt to explain their reason below.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
The free-text box in the "Was this page helpful?" widget now has a visible "Tell us more (optional)" heading and sits below a divider, apart from the reason checkboxes. "Another reason" also gets a line of subtext like the other options. Both widgets get the change: the React one on current pages and the design-system one behind
NAVIGATION_PREVIEW.Affects: Site UI
Prompt summary: Feedback on the page feedback component asks for the free-text box to get a label and to be separated visually from the rest of the form. It also asks for "Another reason" to get subtext like the other reasons.
Why
The comment box shows only a placeholder, and its label is visible only to screen readers. Once a reader starts typing, nothing on screen says what the box is for. The box also runs straight into the last reason checkbox, so it reads as part of that list. "Another reason" is the only option without a description, and nothing tells the reader where to explain it.
What
A visible label for the comment box
The "Tell us more (optional)" label now shows above the box, styled like the "What went wrong?" heading. The placeholder repeated the same text, so it is gone. The accessible name of the textbox does not change.
A divider between the reasons and the comment
A thin grey rule, the same one that sits above the whole widget, now separates the comment area from the reason checkboxes. The comment area also has more space above it.
A description for Another reason
"Another reason" now shows "Something else helped. Tell us more below." after Yes, and "Something else went wrong. Tell us more below." after No. The text points readers to the comment box. API pages use the same text.
The design-system widget matches
With
NAVIGATION_PREVIEWon, pages render the Razor widget inComponents/Chrome/Feedback/. It gets the same visible label, divider and "Another reason" description, and no placeholder. Itsfeedback__sr-onlyrule had no other user, so it is removed.Regression checks
A Vitest case fails when the React label goes back to screen-reader-only or the placeholder returns. Another checks the "Another reason" description after Yes and after No. The
ApiBetaBannerTestsHTML snapshot locks the Razor label markup and the new descriptions. No committed check covers the divider, because a journey would have to press Yes or No and send feedback.Verify
Check on the preview
🤖 Generated with Claude Code