Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: give the Usage date inputs an accessible name

[._.]/ Adam Eivy9c3855ad729d
diff --git a/client/src/pages/UsagePage.jsx b/client/src/pages/UsagePage.jsx
index 1695f133d8..4b7b8af4a6 100644
--- a/client/src/pages/UsagePage.jsx
+++ b/client/src/pages/UsagePage.jsx
@@ -406,7 +406,7 @@ function ProviderCostRows({ provider }) {
// partly typed, so binding it straight to the URL param wiped the field
// mid-keystroke. Hold the draft locally and commit only complete dates (or an
// explicit clear); re-sync when the committed value changes underneath.
-function RangeDateInput({ id, value, onCommit }) {
+function RangeDateInput({ id, label, value, onCommit }) {
const [draft, setDraft] = useState(value);
useEffect(() => { setDraft(value); }, [value]);
const handleChange = (e) => {
@@ -420,6 +420,7 @@ function RangeDateInput({ id, value, onCommit }) {
return (
<input
id={id}
+ aria-label={label}
type="date"
value={draft}
onChange={handleChange}
@@ -444,9 +445,9 @@ function CostReportFilters({ period, from, to, isCustom, onPeriod, onRange }) {
))}
<div className={`flex items-center gap-1.5 rounded-full border px-2 py-0.5 ${isCustom ? 'border-port-accent bg-port-accent/10' : 'border-port-border'}`}>
<label htmlFor="usage-from" className="text-xs text-gray-400">From</label>
- <RangeDateInput id="usage-from" value={from} onCommit={(v) => onRange(v, to)} />
+ <RangeDateInput id="usage-from" label="From date" value={from} onCommit={(v) => onRange(v, to)} />
<label htmlFor="usage-to" className="text-xs text-gray-400">To</label>
- <RangeDateInput id="usage-to" value={to} onCommit={(v) => onRange(from, v)} />
+ <RangeDateInput id="usage-to" label="To date" value={to} onCommit={(v) => onRange(from, v)} />
</div>
</div>
);
diff --git a/client/src/pages/UsagePage.test.jsx b/client/src/pages/UsagePage.test.jsx
index 2961c33246..1cac68b7e4 100644
--- a/client/src/pages/UsagePage.test.jsx
+++ b/client/src/pages/UsagePage.test.jsx
@@ -576,7 +576,7 @@ describe('UsagePage custom date range inputs', () => {
it('keeps a half-typed date instead of resetting it, and commits once complete', async () => {
api.getUsage.mockResolvedValue(usage);
render(<MemoryRouter><UsagePage /></MemoryRouter>);
- const from = await screen.findByLabelText('From');
+ const from = await screen.findByLabelText('From date');
const callsBefore = api.getUsage.mock.calls.length;
// Partially typed segments surface as value "" (happy-dom lacks badInput, so