Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions apps/web/app/components/SmartSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,13 @@ export function SmartSearch({
Всички резултати за „{query.trim()}" →
</li>
)}

{!hasResults && !loading && (
<li className="smart-search-empty" role="presentation">
Няма съвпадения. Пробвай с име, ЕИК или УНП.
</li>
)}
{!hasResults && loading && (
<li className="smart-search-empty" role="presentation" aria-live="polite">
Търсене…
</li>
)}
</ul>

{!hasResults && (
<div className="smart-search-empty" role="status" aria-live="polite">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добро подобрение — role="status" е правилният избор за обявяване на състояние към екранни четци вместо <li role="presentation">. Дребна забележка: role="status" вече включва имплицитно aria-live="polite"aria-atomic="true"), така че изричното aria-live="polite" е технически излишно. Може да се остави за яснота — безвредно е.

{loading ? 'Търсене…' : 'Няма съвпадения. Пробвай с име, ЕИК или УНП.'}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проверете дали CSS класът smart-search-empty не е разчитал на това елементът да е <li> вътре в <ul> (напр. padding/подравняване, наследено от списъка). Сега елементът е <div> извън <ul>, така че визуалното оформление може леко да се различава.

</div>
)}
</div>
</div>
);
Expand Down