Skip to content

Commit 26f08ba

Browse files
committed
VentraIP VIPControl: Fixes related to adding DNS records.
1 parent f23d666 commit 26f08ba

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

VentraIPControl.user.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ const DYNAMIC_TWEAKS = [
155155
// structure.
156156
{selector: '.sharedTable__details',
157157
tweak: makePresentational},
158-
{selector: '.sharedTable__head--text, .sharedTable__column, .sharedTable__details--actions',
158+
{selector: '.sharedTable__head--text',
159+
tweak: el => el.setAttribute("role", "columnheader")},
160+
{selector: '.sharedTable__column, .sharedTable__details--actions',
159161
tweak: el => el.setAttribute("role", "cell")},
160162
// IconButton is a <button> wrapping an icon, but the <button> doesn't
161163
// handle clicks. We make the icon itself a button below. role="presentation"
162164
// doesn't work because it's focusable, so we hackily use role="group" instead.
163-
{selector: '.IconButton',
165+
{selector: '.IconButton, button.Tooltip__icon',
164166
tweak: el => el.setAttribute("role", "group")},
165167
{selector: '.icon-edit',
166168
tweak: [makeButton, "Edit"]},
@@ -170,6 +172,18 @@ const DYNAMIC_TWEAKS = [
170172
tweak: [makeButton, "Confirm"]},
171173
{selector: '.icon-x',
172174
tweak: [makeButton, "Cancel"]},
175+
{selector: '.add .icon-plus-faq',
176+
tweak: [makeButton, "Add"]},
177+
{selector: '.Tooltip__icon .icon-alert-circle',
178+
tweak: [makeButton, "Help"]},
179+
// Indicate buttons which open popup menus; e.g. the button to choose the
180+
// type of DNS record to add.
181+
{selector: '.ccp__select--toggle',
182+
tweak: el => el.setAttribute("aria-haspopup", "true")},
183+
// Focus the first button in a popup menu when it appears; e.g. the menu to
184+
// choose the type of DNS record to add.
185+
{selector: '.ccp__select--menu',
186+
tweak: el => el.querySelector("button").focus()},
173187
];
174188

175189
/*** Lights, camera, action! ***/

0 commit comments

Comments
 (0)