Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@sendilkumarn this PR addresses some changes from #129
Because I wasn't able to push to that PR I had to create a new one.
The main changes I made were to turn ARIA into an implementation detail. So the element exposes
value, min, max
attributes and properties, and those reflect to ARIA but only as a side effect. Anyone consuming the component should never need to work with ARIA directly (the same way you don't have to work with ARIA when you're using<input type="range>
).I also tried to refactor the code so most things are driven off of setting the value property. So setting the
value
property triggers theattributeChangedCallback
which in turn moves thethumb
.Also note that changing the
min
ormax
attributes/properties will set the value equal to itself again. This is useful if you havevalue=50
and you changemin
from 0 to 50. Thethumb
will update and appear at the beginning of the track instead of in the middle.I think this could use some more work but I think we're getting to a good place :)