// Works fine with https://placekitten…
let promise = fetch(“https://placekitten.com/200/300”);
hth,
CK
// Works fine with https://placekitten…
let promise = fetch(“https://placekitten.com/200/300”);
hth,
CK
The example won’t work if you run it locally (i.e. through a file:// URL). I’ve added a note to make this clear, and offer solutions to get it running.
Of course, if I just use imageRef.src = “coffee.jpg” . // No fetch. It works.
I appreciate this, and I do talk about this in a note near the bottom of the example section. Thing is though, I chose this example because it demonstrates promises in a simple fashion, understandable by beginners, with immediate visual feedback when it’s worked. It is actually quite hard to come up with a real world promises example that is simple enough for beginners to understand it. Promises are really quite complicated.
I am reading…
There are several instances of —
WAI-ARIA
Would you please add a title attribute to the abbr element?
Set title=“Accessible Rich Internet Applications” so there will be a tooltip to explain the acronym.
Cheers,
C K
I’ve added the expansion once in parens, after the first instance in the article. I didn’t add it everywhere, as I didn’t think it was that useful really - it’s a big jumble of words
I also prefer putting expansions directly in the page rather than in <abbr>
elements, as I think it is better for accessibility.
I was thinking more about the “WAI-ARIA” link on the first line of the “Enter WAI-ARIA” paragraph.
I believe screen readers will speak the title=“text” and let listeners know what page the link connects to. The tooltip is just bonus.
All the other links in the “Roles” paragraph have tooltips.
hth,
C K
Bad URL for sample video…
YouTube Error: Video unavailable
take a look at Audio Transcription Sample 1 and choose More >
Bad link to brightcove…
Using the Flash-Only Player API for Closed Captioning,
Error: Page Not Found
From my experience, it is not consistent across screenreaders. I’ve moved the expansion to where you suggested, as I think it is a better place.
Bad link to brightcove…
I’ve found a link that works, and put that one on there instead.
I’ve fixed this too - thanks for reporting these!
Are you notified when I edit the Wiki?
C K
Android issue…
Android 8.1
Settings / Accessibility / TalkBack
// Good for older phones
Newer than Android 8.1
Settings / General (tab) / Accessibility / Vision / TalkBack
// Not what I would call an improvement
To turn TalkBack off…
Navigate to Accessibility > TalkBack .
// Your call
Depends what page you are editing. I watch the whole of the MDN /Learn/ tree, so I’ll get emailed if you make changes there.
I am happy for you to make these fixes yourself in future, although I’ll make the ones you’ve already reported.
Android 8.1
Settings / Accessibility / TalkBack// Good for older phones
Newer than Android 8.1
Settings / General (tab) / Accessibility / Vision / TalkBack
Updated — thanks!
// Not what I would call an improvement
No, certainly not
To turn TalkBack off…
Navigate to Accessibility > TalkBack .
Ah yes, I’ve updated this too now, thanks again!
Hi Chris, what is the best way to get help for your Learning web Development pages? im really stuck at the Conditional 1,2, 3 … Tests and Need help to Forward. i cannot find any Solutions for them on your Websites. Before It was really helpful to have a solution buttons underneath the explanations. Thx for info and help. Regards
I’ve left those off this time, as many people were cheating without trying the exercise properly
Best way is to ask me, on here. I replied to your previous post. What are you stuck on now?
Hi Chris. I opened a new tag for an assesment in the Conditionals 2 test. I saw that you allready found it and answered. Can you see my Code (Codepen) ? It must be a different solution. It`s all About scores and Responses in this test …
Hi Chris,
need your help…
How could I replace the last comma in the string below to " and "?
“Bob Smith is 32 years old. He likes music, reading, singing, dancing.”
what I have is:
var newstr = str.replace(str[str.lastIndexOf(",")], " and ");
but result changes the first comma to " and "… I am stuck at this step… Look forward to your help…
Thanks,
Livia
@lsyh1210 I’d probably handle this in the loop, rather than trying to do it afterwards (which would require a regular expression; doable, but a bit fiddly). If you do something like (in pseudocode)
if (this is the last item in the array) {
string += ' and ' + names[i] + '.'
} else {
string += names[i] + ', '
}
You can get the last item in an array with array[array.length - 1]