Make WordPress Core

Opened 6 weeks ago

Last modified 5 weeks ago

#66180 accepted defect (bug)

Twenty Twenty-Five: Update input field border color

Reported by: joedolson Owned by: joedolson
Priority: normal Milestone: 7.2
Component: Bundled Theme Version:
Severity: normal Keywords: has-patch
Cc: Focuses: accessibility

Description (last modified by sabernhardt)

Part of the process to meet the updated accessibility-ready requirements.

Adjust the border color for search & input fields to accent-4, which is #686868, and meets contrast guidelines.

Attachments (2)

66180-before.png​ (15.9 KB ) - added by rahultank 5 weeks ago.
Search input and comment textarea, before patch
66180-after.png​ (15.9 KB ) - added by rahultank 5 weeks ago.
Search input and comment textarea, with patch (PR 13724)

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in ​PR #13724 on ​WordPress/wordpress-develop by ​@joedolson.


6 weeks ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/66180

Use of AI Tools

None

#2 @joedolson
6 weeks ago

  • Focuses accessibility added
  • Owner set to joedolson
  • Status new → accepted

@rahultank
5 weeks ago

Search input and comment textarea, before patch

@rahultank
5 weeks ago

Search input and comment textarea, with patch (PR 13724)

#3 @rahultank
5 weeks ago

Patch Testing Report

Patch tested: ​https://github.com/WordPress/wordpress-develop/pull/13724

Environment

  • WordPress: 7.1.2 (before) / trunk with PR #13724 (after), both in WordPress Playground
  • Browser: Google Chrome 153.0.8010.52
  • OS: Linux
  • Theme: Twenty Twenty-Five
  • MU Plugins: None
  • Plugins: None

Steps taken

  1. Created a page with a Search block and opened it on the front end.
  2. Opened the "Hello world!" post and scrolled to the comment form (logged in, so the Comment textarea is shown).
  3. Checked the border colour of the search input and the comment textarea, and its contrast against the white background.
  4. Repeated the same steps with the patch applied.
  5. ✅ Patch is solving the problem.

Results

  • Before the patch: the search input and the comment textarea used accent-6 (rgba(0, 0, 0, 0.2), shown as #cccccc on white). Contrast against the background: 1.61:1, below the 3:1 needed for non-text contrast.
  • With the patch: both use accent-4 (#686868). Contrast against the background: 5.57:1, which meets 3:1.
  • The border radius and padding of the fields did not change.

Expected result

The borders of the search input and the comment form fields use accent-4 (#686868) and meet the 3:1 non-text contrast requirement.

Screenshots/Screencast with results

Before patch (search input and comment textarea):
Search input and comment textarea, before patch

With patch (search input and comment textarea):
Search input and comment textarea, with patch (PR 13724)

​@sabernhardt commented on ​PR #13724:


5 weeks ago
#4

Replacing Accent 6 would increase contrast in almost all of the style variations (Twilight's border is white with either Accent 6 or Accent 4, matching the input background).

Style Before patch With patch
Default #00000033<br>https://github.com/user-attachments/assets/c4c9efd8-8350-4373-bdb3-30987736c912 #686868<br>https://github.com/user-attachments/assets/1022eab7-e910-4e82-a38d-a24de42fc3ee
Evening #FFFFFF33<br>https://github.com/user-attachments/assets/4dd9d10b-9e2a-4eb8-9d0d-d156c6e3c0d9 #CBCBCB*<br>https://github.com/user-attachments/assets/68323ec9-0ebb-47f8-bbe4-4884db458ed8
Noon #19191933<br>https://github.com/user-attachments/assets/497815b7-a446-4b18-ac43-d97c98f36a54 #5F5F5F*<br>https://github.com/user-attachments/assets/31dfb1df-cb31-49d6-ac62-9738b827c242
Dusk #3B3B3B33<br>https://github.com/user-attachments/assets/0ed0f290-821e-4faa-b6ef-64fc8a7df35f #5F5F5F<br>https://github.com/user-attachments/assets/1cdaccb4-8f22-4b27-8ab8-a23a09dcdd3a
Afternoon #51602833<br>https://github.com/user-attachments/assets/068a6915-29eb-4e83-b78a-04c4759d1000 #516028*<br>https://github.com/user-attachments/assets/ba2983d3-fb2f-4389-b7de-e3a3a504f75f
Twilight #FFFFFF33<br>https://github.com/user-attachments/assets/0df158df-e0b6-4a29-80d8-a362bcda3bc4 #FFFFFF*<br>https://github.com/user-attachments/assets/5afc3774-cf7a-4154-ba66-bdf3020a4686
Morning #19191933<br>https://github.com/user-attachments/assets/652daa84-3d8b-47bc-8391-ce077c442d7a #5F5F5F*<br>https://github.com/user-attachments/assets/8054d52d-2da6-4754-90c2-a2014a54f893
Sunrise #DB9AB133<br>https://github.com/user-attachments/assets/912c9ec3-a8ee-4b97-9b69-bc6427c1bdea #DB9AB1*<br>https://github.com/user-attachments/assets/a96fd7a8-233a-440e-bbc2-ac3517797fb3
Midnight #79F3B133<br>https://github.com/user-attachments/assets/5fc0b8e0-70ca-458a-8be1-a19f15560f27 #79F3B1*<br>https://github.com/user-attachments/assets/c70587dd-0f86-4e9e-8df7-ff73bdfa0a32

*Except for Default and Dusk styles, Accent 4 matches the body text color, which is used for labels. (Default's body text is #111111 and Dusk has #3B3B3B.)

The screenshots are taken in Firefox 156/Windows 11, which sets the background for all of the inputs to white. The browser's border color for any text input outside the Search or Comments Form blocks is rgb(143, 143, 157).

#5 @sabernhardt
5 weeks ago

Style Body background Accent 6 (current border color) Accent 6 contrast against body Accent 6 against white input Accent 4 Accent 4 contrast against body Accent 4 against white input
Default #FFFFFF #00000033 1.6 1.6 #686868 5.57 5.57
Evening #1B1B1B #FFFFFF33 1.9 1 #CBCBCB 10.61 1.62
Noon #F8F7F5 #19191933 1.52 1.52 #5F5F5F 5.96 6.38
Dusk #E2E2E2 #3B3B3B33 1.39 1.42 #5F5F5F 4.92 6.38
Afternoon #DAE7BD #51602833 1.3 1.34 #516028 5.28 6.87
Twilight #131313 #FFFFFF33 1.85 1 #FFFFFF 18.58 1
Morning #DFDCD7 #19191933 1.49 1.52 #5F5F5F 4.66 6.38
Sunrise #330616 #DB9AB133 1.42 1.16 #DB9AB1 7.86 2.26
Midnight #4433A6 #79F3B133 1.47 1.07 #79F3B1 6.72 1.37

(The 33 at the end of Accent 6 colors is 20% opacity; an earlier name for the preset was ​opacity-20.)

Last edited 5 weeks ago by sabernhardt (previous) (diff)

#6 @sabernhardt
5 weeks ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.