@celestia-island/hikari 0.55.355 → 0.55.356

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": "@celestia-island/hikari",
3
- "version": "0.55.355",
3
+ "version": "0.55.356",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari UI library, Vue 3 runtime — one design system for Vue 3 and Rust/WASM applications",
@@ -138,6 +138,10 @@ describe("HkFab speed dial", () => {
138
138
  let minis = d.root.querySelectorAll<HTMLButtonElement>(".hk-fab-mini");
139
139
  expect(minis.length).toBe(2);
140
140
  expect(minis[0].getAttribute("aria-hidden")).toBe("true");
141
+ // The mini action's label is its own visible caption; a native title
142
+ // would only repeat it on hover (duplicated-tooltip sweep).
143
+ expect(minis[0].hasAttribute("title")).toBe(false);
144
+ expect(minis[0].querySelector(".hk-fab-mini-label")?.textContent).toBe("Alpha");
141
145
 
142
146
  d.button.click();
143
147
  await nextTick();
@@ -178,7 +178,9 @@ export default defineComponent({
178
178
  tabindex={isOpen.value ? 0 : -1}
179
179
  aria-hidden={isOpen.value ? "false" : "true"}
180
180
  disabled={props.disabled}
181
- title={action.label}
181
+ // No native `title`: the mini action renders its label as
182
+ // visible text and aria-label already names the button, so
183
+ // a title would only repeat the text on screen.
182
184
  aria-label={action.label ?? action.key}
183
185
  onClick={() => onActionClick(action)}
184
186
  >
@@ -50,6 +50,9 @@ describe("HkTagDotRow", () => {
50
50
  const redDot = red.querySelector(".hk-tag-dot__dot") as HTMLElement;
51
51
  expect(redDot.style.getPropertyValue("--hk-tag-color")).toBe("#e5484d");
52
52
  expect(red.querySelector(".hk-tag-dot__label")?.textContent).toBe("Red");
53
+ // No native tooltip repeating the caption: the label is already
54
+ // visible, and the accessible name rides aria-label.
55
+ expect(red.hasAttribute("title")).toBe(false);
53
56
  expect(red.getAttribute("aria-pressed")).toBe("false");
54
57
  expect(red.hasAttribute("data-active")).toBe(false);
55
58
 
@@ -52,7 +52,10 @@ export default defineComponent({
52
52
  disabled={tag.disabled}
53
53
  aria-pressed={tag.active ? "true" : "false"}
54
54
  aria-label={tag.label ?? tag.key}
55
- title={tag.label}
55
+ // No native `title`: the caption span already shows the label, so
56
+ // a title would only repeat the text the user is reading (the
57
+ // duplicated-tooltip defect). The accessible name rides
58
+ // aria-label, which also covers the labelless (dot-only) case.
56
59
  onClick={() => emit("toggle", tag.key)}
57
60
  >
58
61
  <span class="hk-tag-dot__dot" style={{ "--hk-tag-color": tag.color }} />
@@ -323,6 +323,9 @@ describe("HkToast live-region semantics", () => {
323
323
  const button = item.querySelector<HTMLButtonElement>(".hk-toast-action");
324
324
  expect(button).not.toBeNull();
325
325
  expect(button!.textContent).toBe("Undo");
326
+ // The label is the button's own text; a native title would just repeat
327
+ // it on hover (the duplicated-tooltip defect this wave removes).
328
+ expect(button!.hasAttribute("title")).toBe(false);
326
329
 
327
330
  button!.click();
328
331
  await settle();
@@ -160,7 +160,9 @@ const HkToastItem = defineComponent({
160
160
  {props.toast.action && (
161
161
  <button
162
162
  class="hk-toast-action"
163
- title={props.toast.action.label}
163
+ // No native `title`: the button's own text IS the action
164
+ // label, so a title would only repeat what is already on
165
+ // screen (the duplicated-tooltip defect).
164
166
  onClick={(e: MouseEvent) => {
165
167
  e.stopPropagation();
166
168
  handleAction();