Skip to content

Commit 52bea85

Browse files
Merge pull request #1820 from equalizedigital/steve/pro-996-reading-level-summary-card-does-not-convey-the-visible
fix: convey summary status in Reading Level card accessible name
2 parents cf46ebb + 3e65840 commit 52bea85

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

src/sidebar/components/Panels/AccessibilityStatus.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,19 @@ const AccessibilityStatus = () => {
248248
onClick={ handleReadingLevelClick }
249249
role="button"
250250
tabIndex={ 0 }
251-
aria-label={ sprintf(
252-
__( 'View reading level details: %s', 'accessibility-checker' ),
253-
readingLevelText,
254-
) }
251+
aria-label={ summaryStatus
252+
? sprintf(
253+
/* translators: 1: reading level, 2: simplified summary status. */
254+
__( 'View reading level details: %1$s, %2$s', 'accessibility-checker' ),
255+
readingLevelText,
256+
summaryStatus,
257+
)
258+
: sprintf(
259+
/* translators: %s: reading level. */
260+
__( 'View reading level details: %s', 'accessibility-checker' ),
261+
readingLevelText,
262+
)
263+
}
255264
onKeyDown={ ( e ) => {
256265
if ( e.key === 'Enter' || e.key === ' ' ) {
257266
if ( e.key === ' ' ) {

0 commit comments

Comments
 (0)