补强平台订单工具区说明语义标签

This commit is contained in:
萝卜
2026-03-19 06:10:38 +08:00
parent a0f7b4eede
commit c181dbf878
2 changed files with 33 additions and 1 deletions

View File

@@ -1197,7 +1197,7 @@
@endphp
<div class="tool-grid" data-role="po-tools-grid" aria-label="平台订单工具区网格">
<div class="muted muted-xs mb-10" data-role="po-tools-grid-intro">当前工具区承载导出、批量治理与失败标记清理,请先缩小筛选范围再执行动作。</div>
<div class="muted muted-xs mb-10" data-role="po-tools-grid-intro" aria-label="平台订单工具区说明">当前工具区承载导出、批量治理与失败标记清理,请先缩小筛选范围再执行动作。</div>
<div class="tool-group focus-box" data-role="po-tools-group-export" aria-label="平台订单导出工具组">
<div class="tool-group-title">导出</div>
<form method="get" action="/admin/platform-orders/export" class="mb-0">

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexToolGridIntroShouldHaveAriaLabelTest 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_tool_grid_intro_should_have_aria_label(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-grid-intro" aria-label="平台订单工具区说明"', $html);
}
}