补强已付无回执动作语义标签支持
This commit is contained in:
@@ -1 +1 @@
|
||||
<a data-role="{{ $role ?? '' }}" class="{{ $class ?? 'link' }}" href="{!! $href ?? '#' !!}">{{ $label ?? '' }}</a>
|
||||
<a data-role="{{ $role ?? '' }}" @if(!empty($ariaLabel ?? '')) aria-label="{{ $ariaLabel }}" @endif class="{{ $class ?? 'link' }}" href="{!! $href ?? '#' !!}">{{ $label ?? '' }}</a>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a class="{{ $class ?? 'btn btn-secondary btn-sm' }}" href="{{ $href ?? '#' }}">{{ $label ?? '' }}</a>
|
||||
<a @if(!empty($ariaLabel ?? '')) aria-label="{{ $ariaLabel }}" @endif class="{{ $class ?? 'btn btn-secondary btn-sm' }}" href="{{ $href ?? '#' }}">{{ $label ?? '' }}</a>
|
||||
|
||||
@@ -1063,6 +1063,7 @@
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
@@ -1094,6 +1095,7 @@
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
])
|
||||
</div>
|
||||
<div class="mt-6 actions gap-10">
|
||||
@@ -1102,12 +1104,14 @@
|
||||
'class' => 'btn btn-secondary btn-sm',
|
||||
'href' => $safeFullUrlWithQuery(['receipt_status' => 'has', 'page' => null]),
|
||||
'label' => '切到有回执集合',
|
||||
'ariaLabel' => '切到有回执集合',
|
||||
])
|
||||
@include('admin.platform_orders._summary_text_link', [
|
||||
'role' => 'po-tools-paid-no-receipt-clear-syncable',
|
||||
'class' => 'btn btn-secondary btn-sm',
|
||||
'href' => $safeFullUrlWithQuery(['syncable_only' => null, 'page' => null]),
|
||||
'label' => '取消只看可同步(先治理)',
|
||||
'ariaLabel' => '取消只看可同步(先治理)',
|
||||
])
|
||||
</div>
|
||||
<div class="muted governance-block-footnote" data-role="po-tools-paid-no-receipt-footnote" aria-label="已付无回执治理优先级说明">收费闭环优先:先补回执,再推进同步。</div>
|
||||
@@ -1124,6 +1128,7 @@
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
])
|
||||
</div>
|
||||
<div class="mt-6 actions gap-10">
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveAriaLabelTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_platform_orders_tools_paid_no_receipt_hint_actions_should_have_aria_label(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
$this->assertStringContainsString('aria-label="定位到批量同步订阅工具"', $html);
|
||||
$this->assertStringContainsString('aria-label="切到有回执集合"', $html);
|
||||
$this->assertStringContainsString('aria-label="取消只看可同步(先治理)"', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user