From 6720a8a467cb5b9e38a6050f2d9e2915d53bf85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Thu, 19 Mar 2026 05:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=BC=BA=E5=B7=B2=E4=BB=98=E6=97=A0?= =?UTF-8?q?=E5=9B=9E=E6=89=A7=E5=8A=A8=E4=BD=9C=E8=AF=AD=E4=B9=89=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_summary_text_link.blade.php | 2 +- .../_tool_anchor_button.blade.php | 2 +- .../admin/platform_orders/index.blade.php | 5 +++ ...eiptHintActionsShouldHaveAriaLabelTest.php | 34 +++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveAriaLabelTest.php diff --git a/resources/views/admin/platform_orders/_summary_text_link.blade.php b/resources/views/admin/platform_orders/_summary_text_link.blade.php index cdd2339..f1f2d56 100644 --- a/resources/views/admin/platform_orders/_summary_text_link.blade.php +++ b/resources/views/admin/platform_orders/_summary_text_link.blade.php @@ -1 +1 @@ -{{ $label ?? '' }} +{{ $label ?? '' }} diff --git a/resources/views/admin/platform_orders/_tool_anchor_button.blade.php b/resources/views/admin/platform_orders/_tool_anchor_button.blade.php index 4b8703c..5130f63 100644 --- a/resources/views/admin/platform_orders/_tool_anchor_button.blade.php +++ b/resources/views/admin/platform_orders/_tool_anchor_button.blade.php @@ -1 +1 @@ -{{ $label ?? '' }} +{{ $label ?? '' }} diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 1fb72bd..c84d568 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1063,6 +1063,7 @@ @include('admin.platform_orders._tool_anchor_button', [ 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', + 'ariaLabel' => '定位到批量同步订阅工具', ]) @@ -1094,6 +1095,7 @@ @include('admin.platform_orders._tool_anchor_button', [ 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', + 'ariaLabel' => '定位到批量同步订阅工具', ])
@@ -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' => '取消只看可同步(先治理)', ])
收费闭环优先:先补回执,再推进同步。
@@ -1124,6 +1128,7 @@ @include('admin.platform_orders._tool_anchor_button', [ 'href' => '#batch-activate-subscriptions', 'label' => '定位到批量同步订阅工具', + 'ariaLabel' => '定位到批量同步订阅工具', ])
diff --git a/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveAriaLabelTest.php b/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveAriaLabelTest.php new file mode 100644 index 0000000..21ecdc2 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintActionsShouldHaveAriaLabelTest.php @@ -0,0 +1,34 @@ +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); + } +}