Page 1 of 1

message stack close btn aria-label

Posted: Fri Jun 26, 2026 7:44 am
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

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:31 am
by PiLLaO
Try with class="btn-close" instead of class="close"

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:37 am
by BatteryTrader
Thanks, but already tried that, while it looks ok, loses its function and does not close.

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:44 am
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

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:48 am
by BrockleyJohn
Specifically, you used the one for the previous version of bootstrap

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:49 am
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

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 8:56 am
by BatteryTrader
Ah

Yes thats it, diddnt think of looking in there, thanks very much

Re: message stack close btn aria-label

Posted: Fri Jun 26, 2026 10:19 am
by burt
and

Code: Select all

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