File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ class BlaBlaBlocksInfotip extends HTMLElement {
193193 clip-rule="evenodd"
194194 />` ,
195195 } ;
196- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
196+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" role="img" >
197197 ${ iconPaths [ iconType ] }
198198 </svg>` ;
199199 }
@@ -206,7 +206,7 @@ class BlaBlaBlocksInfotip extends HTMLElement {
206206 ${ this . renderStyle ( ) }
207207 </style>
208208 <span class="wrapper">
209- <span class="text" tabindex="0" aria-describedby="infotip-popover">
209+ <span class="text" tabindex="0" role="button" aria-describedby="infotip-popover">
210210 <span class="icon"></span>
211211 <slot></slot>
212212 </span>
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727 info ,
2828 notAllowed ,
2929 starEmpty ,
30+ update ,
3031} from '@wordpress/icons' ;
3132import { PanelColorSettings } from '@wordpress/block-editor' ;
3233import { useSelect } from '@wordpress/data' ;
@@ -202,7 +203,9 @@ function IconTabContent( {
202203
203204 // Show the info icon enabled as a default when no icon type is set, and icons are just enabled.
204205 if ( iconEnabled && ! activeAttributes [ 'icon-type' ] ) {
205- activeAttributes [ 'icon-type' ] = 'info' ;
206+ updateAttributes ( {
207+ 'icon-type' : 'info' ,
208+ } ) ;
206209 }
207210
208211 return (
@@ -222,7 +225,7 @@ function IconTabContent( {
222225 < Button
223226 accessibleWhenDisabled = { true }
224227 disabled = { ! iconEnabled }
225- key = { icon . label }
228+ key = { icon . id }
226229 icon = { icon . graphic }
227230 isPressed = {
228231 activeAttributes [ 'icon-type' ] === icon . id
You can’t perform that action at this time.
0 commit comments