@internetarchive/ia-topnav 1.3.5-alpha5 → 1.3.5-alpha7

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-topnav",
3
- "version": "1.3.5-alpha5",
3
+ "version": "1.3.5-alpha7",
4
4
  "description": "Top nav for Internet Archive",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "index.js",
@@ -57,6 +57,7 @@ class DropdownMenu extends TrackedElement {
57
57
  return html`<a
58
58
  href="${formatUrl(link.url, this.baseHost)}"
59
59
  class="${link.class}"
60
+ tabindex="${this.open ? '' : '-1'}"
60
61
  @click=${this.trackClick}
61
62
  data-event-click-tracking="${this.config.eventCategory}|Nav${link.analyticsEvent}"
62
63
  aria-label=${calloutText ? `New feature: ${link.title}` : nothing}>
@@ -103,6 +103,7 @@ class MediaButton extends TrackedElement {
103
103
  @click=${this.followable ? this.trackClick : this.onClick}
104
104
  data-event-click-tracking="${this.analyticsEvent}"
105
105
  title="${this.tooltipPrefix} ${this.mediatype} menu"
106
+ tabindex="${this.openMenu === 'media' ? '' : '-1'}"
106
107
  >
107
108
  ${this.menuItem}
108
109
  </a>
package/src/nav-search.js CHANGED
@@ -99,19 +99,8 @@ class NavSearch extends TrackedElement {
99
99
  placeholder="Search"
100
100
  autocomplete="off"
101
101
  tabindex="2"
102
- @focus=${this.toggleSearchMenu}
103
- @blur=${(e) => {
104
- if (e.relatedTarget?.tagName !== 'SEARCH-MENU') {
105
- this.dispatchEvent(new CustomEvent('menuToggled', {
106
- detail: {
107
- menuName: 'search'
108
- },
109
- composed: true,
110
- bubbles: true,
111
- }));
112
- }
113
- }}
114
102
  value=${this.searchQuery || ''}
103
+ @focus=${this.toggleSearchMenu}
115
104
  />
116
105
  ${this.searchInsideInput}
117
106
  <button
@@ -157,7 +157,9 @@ class PrimaryNav extends TrackedElement {
157
157
  return html`
158
158
  <a href="${formatUrl('/create', this.baseHost)}"
159
159
  class="upload"
160
- tabindex="1">
160
+ tabindex="1"
161
+ @focus=${this.toggleMediaMenu}
162
+ >
161
163
  ${icons.upload}
162
164
  <span>Upload</span>
163
165
  </a>`;
@@ -89,6 +89,8 @@ export default css`
89
89
 
90
90
  label {
91
91
  padding: 0;
92
+ font-weight: normal;
93
+ margin: 0;
92
94
  }
93
95
 
94
96
  label + label {