Skip to:
Content

Opened 12 months ago

Closed 7 months ago

#7421 closed enhancement (fixed)

Accessibility: Change sitewide notices "Close" controls to semantic buttons

Reported by: mercime Owned by: mercime
Milestone: 2.9 Priority: normal
Severity: normal Version:
Component: Messages Keywords: has-patch has-screenshots
Cc:

Description

Change "close" empty link, <a href="#"...>, to <button> element in the sitewide notices markup showing up in either the widget or under the admin bar.

Attachments (11)

sitewide-notices-admin-on.jpg (77.6 KB) - added by mercime 12 months ago.
sitewide-notices-widget.jpg (52.2 KB) - added by mercime 12 months ago.
7421.patch (1.6 KB) - added by mercime 12 months ago.
sitewide-notices-widget-2.jpg (49.7 KB) - added by mercime 12 months ago.
alternatives
sitewide-notices-admin-2.jpg (69.3 KB) - added by mercime 12 months ago.
7421.2.patch (1.8 KB) - added by mercime 12 months ago.
sitewide-notices.jpg (35.8 KB) - added by mercime 12 months ago.
sitewide-notices.2.jpg (159.4 KB) - added by mercime 11 months ago.
7421.3.patch (2.3 KB) - added by mercime 11 months ago.
7421.4.patch (3.7 KB) - added by mercime 8 months ago.
sitewide-notices-button.png (12.3 KB) - added by mercime 8 months ago.

Download all attachments as: .zip

Change History (19)

#1 @slaFFik
12 months ago

What about the same concept that is used in is-dismissable (or similar) class for notices in wp-admin area?
Mainly the x "button" on the right side of the notice.

@mercime
12 months ago

#2 @mercime
12 months ago

  • Keywords has-patch has-screenshots added

@mercime
12 months ago

alternatives

#3 @mercime
12 months ago

@slaFFik Could do that for the sitewide notice under admin bar. Attached 2 new images for both scenarios. I am partial to simply changing the link to a button element though :)

Last edited 12 months ago by mercime (previous) (diff)

#4 @johnjamesjacoby
12 months ago

This is a welcome change.

How about a combination of keeping the text but floating it to the right? Visually, I'd want it to be aligned with the top-most line of text, and with a right-margin that's equal to the left-margin of the top line of text. Does that make sense? Kinda like how the admin-notices in wp-admin work currently?

@mercime
12 months ago

#5 @DJPaul
12 months ago

  • Milestone changed from Awaiting Review to 2.9

@mercime If you can finish this and get it into trunk very soon, feel free to move this ticket back to 2.8.

@mercime
11 months ago

#6 @mercime
11 months ago

Replying to johnjamesjacoby:

How about a combination of keeping the text but floating it to the right? Visually, I'd want it to be aligned with the top-most line of text, and with a right-margin that's equal to the left-margin of the top line of text. Does that make sense? Kinda like how the admin-notices in wp-admin work currently?

Sorry I was delayed. Per your feedback, new patch tested with long subject title and text plus screenshot are attached .

Replying to DJPaul:

@mercime If you can finish this and get it into trunk very soon, feel free to move this ticket back to 2.8.

Swamped at the time to do complete at the time for 2.8 :(

@mercime
8 months ago

#7 @mercime
8 months ago

7421.4.patch uses the new BP tooltip introduced in #7188
New screenshot attached - new button element on Twenty Seventeen.

#8 @mercime
7 months ago

  • Owner set to mercime
  • Resolution set to fixed
  • Status changed from new to closed

In 11582:

Accessibility: Change empty link in Sitewide Notice to a button element.

Using semantic markup like the button element instead of an empty anchor link
like href=# in this case, helps us improve accessibility for all users.

Props mercime, slaFFik, johnjamesjacoby.
Fixes #7421.

Note: See TracTickets for help on using tickets.