-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Consume id
and expose input focus state
#388
Comments
It's standard HTML to associate the |
Understood. ember-file-upload ships with the hidden <label> /* <---- This label is from our app that consumes ember-file-upload */
Custom Label
</label>
<label> /* <---- This label and downward are from ember-file-upload */
<input hidden>
</label> |
There are some issues with the public API of this addon. It does not fit well in a modern Ember world. It misses a good way to customize the rendered HTML output. Angle bracket component invocation is only partly supported - and does not allow customization of interesting parts. There were already some discussion in #316, #293 and #292. Also #387 seems to be caused by this. We need to come up with an improved public API, which allows more customization by the consumer of this addon and is less opinionated about the HTML to render. I think splatattributes provided by angle bracket component invocation and named blocks should give us all what we need. Thanks to ember-named-blocks-polyfill there is nothing stopping us from relying on these new techniques. But we need to design such an API. @gilest started the work in #316. We need to pick it up and challenge proposals with use cases. All what is currently missing seems to be the time to do so. 😜 |
In v5 we are deprecating the component in favour of a modifier. See the Upgrade guide here. Feedback appreciated. |
@gilest proposed v5 looks great IMO and would solve both the problems described in this issue. |
Should be closed by v5 |
We have run into issues similar to what's described in #387, but for reasons other than accessibility.
label
input is rendered outside of theFileUpload
component and therefore has no ability to trigger the file upload dialog when it is clicked. Suggestion: Allow the id attribute to be passed from the outer context to theinput
. This would associate the click from ourlabel
with the ember-file-uploadinput
. Roughly looking like:Generated HTML:
input
's focus state. This is due to theinput
beingtype='hidden'
. Suggestion is hide the input with CSS e.g.,:I believe this would allow solve the issue @CNovakPB #387 because the input would still be focusable, and would allow us to target ember-file-upload's focus state with the
focus-within
pseudo class e.g.,:The text was updated successfully, but these errors were encountered: