gorork/paper-audio-player

Update to Polymer 2.0 / Hybrid element

Opened this issue ยท 5 comments

It would be great if this awesome element would be updated to Polymer 2.0 or transformed into a Polymer 1/2 Hybrid element.
Resources would be available here and here. ๐Ÿ‘

@stemuk Thank you for this suggestion! It's definitely in a roadmap. Would you be looking to participate? :)

@gorork I've started porting the element to a hybrid element, over at marcus13345:polymer-2.0-migration

A few issues have come up:

The test suite references basicPlayer.querySelector('#progress').style.backgroundColor instead of using basicPlayer.$.... I'm not sure if this is by design, but it doesnt seem to play nicely with shadowDOM v1. Ive replaced it wit ha $ reference for now but wanted to double check.

The aria-describedby attribute attached to the host is unable to find the title element, as its hidden by the shadow dom.

@marcus13345 Awesome job you're doing! ๐Ÿ‘

Unless the basicPlayer.$... breaks the styling, it should be OK to update it.

What changes do you need to solve the aria-describedby issue?

@gorork

the problem with the aria-describedby attribute is that it is looking for an ID in the accessibility tree, which in its current implementation will completely ignore elements inside of a shadow Root. With Shady DOM, it works fine, as the accessibility tree is still global.

@robdodson any help here?

I don't know the structure of the element off of the top of my head but you could create a non-visible element inside of the shadow root where you pipe aria-describedby text into it from an attribute or a property. I showed a similar technique for aria-label in this example i think https://www.youtube.com/watch?v=7a6bLXw2lqQ&list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g&index=7