astro-accelerator 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.7",
2
+ "version": "0.3.8",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -1093,14 +1093,14 @@ button[data-share]:focus {
1093
1093
  }
1094
1094
 
1095
1095
  /* Detail tabs */
1096
-
1097
- .tablist [role="tablist"] {
1098
- min-width: 100%;
1096
+
1097
+ .tab-list {
1098
+ padding-inline: 10px;
1099
1099
  }
1100
1100
 
1101
- .tablist [role="tab"],
1102
- .tablist [role="tab"]:focus,
1103
- .tablist [role="tab"]:hover {
1101
+ .tab-list button,
1102
+ .tab-list button:focus,
1103
+ .tab-list button:hover {
1104
1104
  display: inline-block;
1105
1105
  position: relative;
1106
1106
  z-index: 2;
@@ -1116,7 +1116,7 @@ button[data-share]:focus {
1116
1116
  cursor: pointer;
1117
1117
  }
1118
1118
 
1119
- .tablist [role="tab"][aria-selected="true"] {
1119
+ .tab-list button[aria-selected="true"] {
1120
1120
  margin-top: 0;
1121
1121
  border-width: 2px;
1122
1122
  border-top-width: 6px;
@@ -1126,28 +1126,22 @@ button[data-share]:focus {
1126
1126
  background-color: var(--aft);
1127
1127
  }
1128
1128
 
1129
- .tablist [role="tab"][aria-selected="false"] {
1129
+ .tab-list button[aria-selected="false"] {
1130
1130
  top: 0px;
1131
1131
  }
1132
1132
 
1133
- .tablist [role="tab"] span.focus {
1133
+ .tab-list button span.focus {
1134
1134
  display: inline-block;
1135
1135
  margin: 2px;
1136
1136
  padding: 4px 6px;
1137
1137
  outline: none;
1138
1138
  }
1139
1139
 
1140
- .input-keyboard .tablist [role="tab"]:hover span.focus,
1141
- .input-keyboard .tablist [role="tab"]:focus span.focus,
1142
- .input-keyboard .tablist [role="tab"]:active span.focus {
1143
- outline: 2px solid var(--fore-link);
1144
- }
1145
-
1146
1140
  [role="tabpanel"] {
1147
1141
  position:relative;
1148
1142
  padding: 1rem;
1149
1143
  border: 2px solid var(--fore-link);
1150
- border-radius: 0 var(--block-radius) var(--block-radius);
1144
+ border-radius: var(--block-radius);
1151
1145
  background: var(--aft);
1152
1146
  min-height: 10em;
1153
1147
  overflow: auto;
@@ -22,7 +22,7 @@ function enhanceDetailGroups() {
22
22
 
23
23
  const tablist = document.createElement('div');
24
24
  tablist.role = 'tablist';
25
- tablist.className = 'tablist';
25
+ tablist.className = 'tab-list';
26
26
  participants[0].parentNode.insertBefore(tablist, participants[0]);
27
27
 
28
28
  participants.forEach((p, i) => {
@@ -32,6 +32,7 @@ function enhanceDetailGroups() {
32
32
  // Create the tab panel
33
33
 
34
34
  const tabPanel = document.createElement('div');
35
+ tabPanel.setAttribute('tabindex', '0');
35
36
  tabPanel.setAttribute('role', 'tabpanel');
36
37
  tabPanel.setAttribute('aria-labelledby', `aatb_${ g }_${ i }`);
37
38
  tabPanel.id = `aatb_panel_${ g }_${ i }`;
@@ -122,6 +123,7 @@ class TabsManual {
122
123
 
123
124
  moveFocusToTab(currentTab) {
124
125
  currentTab.focus();
126
+ this.setSelectedTab(currentTab);
125
127
  }
126
128
 
127
129
  moveFocusToPreviousTab(currentTab) {
@@ -183,8 +185,6 @@ class TabsManual {
183
185
  }
184
186
  }
185
187
 
186
- // Since this example uses buttons for the tabs, the click onr also is activated
187
- // with the space and enter keys
188
188
  onClick(event) {
189
189
  this.setSelectedTab(event.currentTarget);
190
190
  }
@@ -36,7 +36,6 @@ function addMobileNav(resizedEventName) {
36
36
  * @param {string} resizedEventName
37
37
  */
38
38
  function addMobileNavigation(icon, resizedEventName) {
39
- icon.tabIndex = 0;
40
39
  const navigationSelector = icon.dataset.navigationid || '';
41
40
  const iconType = icon.firstElementChild && icon.firstElementChild.tagName == 'svg'
42
41
  ? 'svg'