Remove unrealistic font-size from import-button#8590
Remove unrealistic font-size from import-button#8590pmario wants to merge 3 commits intoTiddlyWiki:masterfrom
Conversation
|
|
|
Confirmed: pmario has already signed the Contributor License Agreement (see contributing.md) |
|
Hi @pmario as I said on the original ticket, those Therefore, if we're going to remove those large dimensions we need to understand which browsers are impacted. |
|
I made this PR a draft
IMO it's not a browser problem, but a hack for image-buttons. According to StackOverflow's first answer it will allow a thumbnail button to be used to trigger a file-browser using the full thumbnail size. In our usecase we create a fake button and then add the $browse-widget -- The size of the So for modern browsers we would only need this CSS: (after some brief testing) This construction is still hacky, but it should automatically adjust the input to the size of the parent-element. And it would eliminate the giant DOM element, which is the purpose of this PR. The problem with
Luckily screen readers do see the invisible - input type=file button. -- BUT they also see the fake button which has no functionality. I am not sure about So the question is: Do we want to fix that? The original construction dates back to 2013 and it is an accessibility problem. So I think we should fix it. |
|
Since the browse widget already supports the |
|
Hi @pmario @Leilei332 I am in favour of fixing the accessibility problem. @Leilei332's suggestion is a good one if it works widely – I remember that it didn't used to be possible, but that was quite a few years ago. |
The browse-widget has no class parameter. See: https://tiddlywiki.com/#BrowseWidget There is a hack for a reason. The visual representation of that button is "browser native" and basically impossible to style using standard CSS rules. |
|
Also see: https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications#using_hidden_file_input_elements_using_the_click_method -- Where they describe the mechanism everyone seems to use for the "unstyleable" input-element. It seems we would need to change the browse-widget in a way, that it allows us to use a BUTTON-ID, or a HTML LABEL element, that looks like a button. This may fix the accessibility problem. ... not sure ... more experiments would be needed. |
|
closed as draft |
This PR fixes #8167
It removes unrealistic font-size from import-button -- Edge on Windows 3D-view shows it as fixed.