Merge pull request #6699 from danieltj27/ticket/17376

[ticket/17376] Add aria label to quote reference link
This commit is contained in:
Marc Alexander 2024-10-16 19:18:30 +02:00 committed by GitHub
commit 62f9f53f46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -112,6 +112,7 @@ $lang = array_merge($lang, array(
'VIEW_INFO' => 'Post details',
'VIEW_NEXT_TOPIC' => 'Next topic',
'VIEW_PREVIOUS_TOPIC' => 'Previous topic',
'VIEW_QUOTED_POST' => 'View quoted post',
'VIEW_RESULTS' => 'View results',
'VIEW_TOPIC_POSTS' => array(
1 => '%d post',

View file

@ -38,11 +38,11 @@
<xsl:value-of select="$L_COLON"/>
<xsl:if test="@post_url">
<xsl:text> </xsl:text>
<a href="{@post_url}" data-post-id="{@post_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash">&#8593;</a>
<a href="{@post_url}" aria-label="{L_VIEW_QUOTED_POST}" data-post-id="{@post_id}" onclick="if(document.getElementById(hash.substr(1)))href=hash"><i class="icon fa-arrow-circle-up fa-fw" aria-hidden="true"></i></a>
</xsl:if>
<xsl:if test="@msg_url">
<xsl:text> </xsl:text>
<a href="{@msg_url}" data-msg-id="{@msg_id}">&#8593;</a>
<a href="{@msg_url}" aria-label="{L_VIEW_QUOTED_POST}" data-msg-id="{@msg_id}"><i class="icon fa-arrow-circle-up fa-fw" aria-hidden="true"></i></a>
</xsl:if>
<xsl:if test="@date">
<span class="responsive-hide"><xsl:value-of select="@date"/></span>

View file

@ -283,7 +283,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
),
array(
'[quote=Username post_id=123]...[/quote]',
'<blockquote cite="phpBB/viewtopic.php?p=123#p123"><div><cite>Username wrote: <a href="phpBB/viewtopic.php?p=123#p123" data-post-id="123" onclick="if(document.getElementById(hash.substr(1)))href=hash"></a></cite>...</div></blockquote>'
'<blockquote cite="phpBB/viewtopic.php?p=123#p123"><div><cite>Username wrote: <a href="phpBB/viewtopic.php?p=123#p123" aria-label="VIEW_QUOTED_POST" data-post-id="123" onclick="if(document.getElementById(hash.substr(1)))href=hash"><i class="icon fa-arrow-circle-up fa-fw" aria-hidden="true"></i></a></cite>...</div></blockquote>'
),
array(
// Users are not allowed to submit their own URL for the post