message stack close btn aria-label

If it doesn't quite fit in the other areas, put it here...
Post Reply
BatteryTrader
Contributor
Posts: 153
Joined: Thu Apr 11, 2024 7:18 am
Phoenix Version: 1.1.0.3
Has thanked: 3 times
Been thanked: 17 times

message stack close btn aria-label

Post by BatteryTrader »

Hi
1.1.0.3
I have been trying to put a aria-label onto the close btn of message-alerts

Now, after an embarrassingly large number of hours spent searching for where this would be controlled, I finally (or at least think I) found the right place.

includes/classes/alert_block.php

I copied this file to

includes/system/override/alert_block.php

and changed this line to include the aria-label="Close"

Code: Select all

 $alertBox_string .= '	<button type="button" class="close" data-dismiss="alert" aria-label="Close">&times;</button>' . "\n";
But although technically it worked, i.e., the screen reader can read it

it put the button on a new line, justified to the left, and made it grey
box1.JPG
where it should look like, over on the right
box2.JPG


Any pointers would be nice. There are a few message stacks throughout the site, and I am guessing all are controlled here.

Thank you
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
PiLLaO
Contributor
Posts: 107
Joined: Thu Nov 05, 2020 9:28 pm
Phoenix Version: v1.1.0.6
Has thanked: 53 times
Been thanked: 11 times

Re: message stack close btn aria-label

Post by PiLLaO »

Try with class="btn-close" instead of class="close"
BatteryTrader
Contributor
Posts: 153
Joined: Thu Apr 11, 2024 7:18 am
Phoenix Version: 1.1.0.3
Has thanked: 3 times
Been thanked: 17 times

Re: message stack close btn aria-label

Post by BatteryTrader »

Thanks, but already tried that, while it looks ok, loses its function and does not close.
BrockleyJohn
Certified Developer
Posts: 173
Joined: Mon Mar 01, 2021 5:37 pm
Phoenix Version:
Has thanked: 2 times
Been thanked: 30 times

Re: message stack close btn aria-label

Post by BrockleyJohn »

BatteryTrader wrote: Fri Jun 26, 2026 7:44 am
includes/classes/alert_block.php
That applies to earlier Phoenix versions. You need to copy this one:

includes/system/versioned/1.01.00.00/alert_block.php
BrockleyJohn
Certified Developer
Posts: 173
Joined: Mon Mar 01, 2021 5:37 pm
Phoenix Version:
Has thanked: 2 times
Been thanked: 30 times

Re: message stack close btn aria-label

Post by BrockleyJohn »

Specifically, you used the one for the previous version of bootstrap
PiLLaO
Contributor
Posts: 107
Joined: Thu Nov 05, 2020 9:28 pm
Phoenix Version: v1.1.0.6
Has thanked: 53 times
Been thanked: 11 times

Re: message stack close btn aria-label

Post by PiLLaO »

I just make the changes that you describe up, with no issues.

I'm on 1.1.0.5

EDIT: I use the file that BrocklyJohn saids
BatteryTrader
Contributor
Posts: 153
Joined: Thu Apr 11, 2024 7:18 am
Phoenix Version: 1.1.0.3
Has thanked: 3 times
Been thanked: 17 times

Re: message stack close btn aria-label

Post by BatteryTrader »

Ah

Yes thats it, diddnt think of looking in there, thanks very much
User avatar
burt
Core Team
Posts: 4547
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: message stack close btn aria-label

Post by burt »

and

Code: Select all

aria-label="' . IMAGE_BUTTON_CLOSE . '"
Might as use the already existing Close text..


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply