Allow "Browse…" button-text to be customized, on <input type="file"> button

UNCONFIRMED
Unassigned

Status

()

Core
DOM: Core & HTML
UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: Shanmugavel Arunachalam, Unassigned, NeedInfo)

Tracking

34 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141127111021

Steps to reproduce:

I have added a file upload option in project.


Actual results:

file upload browse button is coming with undescore or three donts. "Browse_" / "Browse..."


Expected results:

Expected. "Browse"

Comment 1

3 years ago
Could you attach a testcase, please.
Component: Untriaged → Layout: Form Controls
Flags: needinfo?(iashanmugavel)
Keywords: testcase-wanted
Product: Firefox → Core
Testcase is presumably something like: data:text/html,<input type="file">, which renders as " [Browse...][---textbox---]"

It sounds like the reporter wants the ability to customize the "Browse..." text, on the integrated button.

I'm not sure if that's possible, offhand.  You can use the "value" attribute on <input type="submit"> -- e.g. data:text/html,<input type="submit" value="hello"> -- but that doesn't seem to work for type="file".

(In any case, I think this belongs in DOM, not in Layout:FormControls, since changing the label would be done via the DOM somehow (or via some attribute on the <input>).  Reclassifying.)
Component: Layout: Form Controls → DOM: Core & HTML
Keywords: testcase-wanted
Summary: browse button → Allow "Browse…" button-text to be customized, on <input type="file"> button
This sounds like a request for a spec change more than anything else, to allow customizing the text.

The UI convention for controls that will lead to posing of a dialog is to have an ellipsis after the label, so the default behavior is not going to change from that.
You need to log in before you can comment on or make changes to this bug.