Skip to content

Conversation

@MyLightIsOn
Copy link
Collaborator

While creating the script for this, I noticed that the previous version that shows up on internet archive did not sync the slider with the text. I'm guessing the originally it did work. I added this code in, but I changed the range slider text input to a span. Leaving it a text input would imply that the user could type something in the input and it would update the slider. We could do this too, but I though that was a lot of code bloat that doesn't serve the purpose that the example is trying to show. making it a span makes it read only.

My question is, should we add a live region to this to make it accessible and update the example to reflect?

- Added custom range slider code to markdown-content.tsx
- Uncommented range slider component in Developer Notes
Range slider now updates the value in the input
@MyLightIsOn MyLightIsOn requested a review from silverli November 19, 2025 14:17
max="11"
value="10"
max="10"
step="1">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no styling here yet, but if the functionality checks out, I can spice it up.

export const getMarkdownFunctionMap = (
navigate: NavigateFunction
): Record<string, (event: React.MouseEvent<Element>) => void> => ({
): Record<string, (event: React.SyntheticEvent) => void> => ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed MouseEvent to SyntheticEvent to generalize the Markdown function handler type to accept any React synthetic event. This allows buttons/links/divs (mouse events) and inputs (form/change events) are all supported consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants