Skip to content

Instantly share code, notes, and snippets.

@hypeJunction
Last active January 9, 2022 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hypeJunction/826c994c0b726a3bc0eba56a95b37f45 to your computer and use it in GitHub Desktop.
Save hypeJunction/826c994c0b726a3bc0eba56a95b37f45 to your computer and use it in GitHub Desktop.
<label>
Add File
<input type="file"
accepts="image/*"
aria-invalid
aria-describedby="file-input-help file-2-error"
aria-errormessage="file-2-error"
/>
</label>
<span id="file-input-help">Please add 1 or more image files</span>
<ul aria-label="File List">
<li aria-labelledby="file-1" aria-busy aria-describedby="file-1-progress">
<svg><title>Image File Icon</title></svg>
<span id="file-1">elephant.jpg</span>
<div class="spinner"
aria-label="Uploading elephang.jpg"
role="progressbar"
aria-valuenow="25"
aria-valuemin="0"
aria-valuemax="100"
/>
</li>
<li aria-labelledby="file-2" aria-invalid aria-describedby="file-2-error">
<svg><title>PDF File Icon</title></svg>
<span id="file-2">elephant.pdf</span>
<div role="alert" id="file-2-error">PDF files are not supported</alert>
<button aria-controls="file-2">Remove</button>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment