Skip to content

Commit 2f094be

Browse files
committed
[PRAC/cont] Add "aria-attributes"
Adding some/missing "aria-attributes" accord to Accessibility tree view. core: B-3 / JS-BL
1 parent 8d86682 commit 2f094be

File tree

1 file changed

+9
-0
lines changed
  • core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/js

1 file changed

+9
-0
lines changed

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/js/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,25 @@
169169

170170
outputTitleHash.setAttribute('id', 'hash-tag-title');
171171
outputTitleHash.setAttribute('tabindex', '0');
172+
outputTable.setAttribute('aria-label', 'Таблица данных о клиентах');
172173
outTblHeadThId.setAttribute('id', 'table-th-id');
173174
outTblHeadThId.setAttribute('tabindex', '0');
175+
outTblHeadThId.setAttribute('scope', 'col');
174176
outTblHeadThFIO.setAttribute('id', 'table-th-fio');
175177
outTblHeadThFIO.setAttribute('tabindex', '0');
178+
outTblHeadThFIO.setAttribute('scope', 'col');
176179
outTblHeadThCreationDT.setAttribute('id', 'table-th-dt');
177180
outTblHeadThCreationDT.setAttribute('tabindex', '0');
181+
outTblHeadThCreationDT.setAttribute('scope', 'col');
178182
outTblHeadThChanges.setAttribute('id', 'table-th-change');
179183
outTblHeadThChanges.setAttribute('tabindex', '0');
184+
outTblHeadThChanges.setAttribute('scope', 'col');
180185
outTblHeadThContacts.setAttribute('id', 'table-th-contact');
181186
outTblHeadThContacts.setAttribute('tabindex', '0');
187+
outTblHeadThContacts.setAttribute('scope', 'col');
182188
outTblHeadThActions.setAttribute('id', 'table-th-action');
183189
outTblHeadThActions.setAttribute('tabindex', '0');
190+
outTblHeadThActions.setAttribute('scope', 'col');
184191

185192
outputTitleHash.textContent = '#';
186193
outputTitle.textContent = 'Клиенты';
@@ -748,6 +755,8 @@
748755

749756
let isDropdownToggleAllowed = true; // возможность/разрешение на показ выпадающего списка
750757

758+
// ! может вынести в отдельную функцию.. после if.. просто вызов функции() которая всё делает??
759+
751760
// показ/скрытие выпадающего списка вариантов/контактов (открытым может быть только один, переключение)
752761
addModalContactDropBtn.addEventListener('click', (event) => {
753762
if (!isDropdownToggleAllowed) return; // проверка возможности/разрешения на показ списка

0 commit comments

Comments
 (0)