Wikipedia:Reference desk/Archives/Computing/2015 January 25
Computing desk | ||
---|---|---|
< January 24 | << Dec | January | Feb >> | January 26 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
January 25
[edit]HTML alt text not displayed
[edit]<a href="http://www.strayer.edu">
<img src="cat_dog_hug.png" alt="This is the link to Strayer University" style="width:42px;height:42px;border:0">
</a>
I expect to see the text "This is the link to Strayer University" somewhere, but I don't, in either Chrome or IE. Any ideas ? StuRat (talk) 03:52, 25 January 2015 (UTC)
UPDATE: Just from trial and error, it seems I need to write "title" in place of "alt", despite what a normally reliable web site said. Is "alt" just wrong, deprecated, or something else ? StuRat (talk) 03:59, 25 January 2015 (UTC)
- The alt attribute is displayed in place of an image. So, for example, if you disabled images in your browser, you would see the alt attribute in place of the image. It is also used by screen readers to describe the image. The title attribute's text is displayed when you hover over the element with your mouse. Older versions of IE would display alt text in a tool tip when you hovered your mouse over the element, but this was really just a bug and Microsoft has fixed it. So, it sounds like the Web site you referenced is out of date and was really just describing IE's behavior in the past.—Best Dog Ever (talk) 04:59, 25 January 2015 (UTC)
- Thanks, that explains it. I was thinking it was an alternative text displayed in place of the address of the image. StuRat (talk) 05:23, 25 January 2015 (UTC)
- It wasn't just IE. I think all major browsers displayed the alt attribute as a tooltip before the title attribute existed. It was a feature, not a bug. -- BenRG (talk) 18:38, 25 January 2015 (UTC)
But what happens if no alt text is defined ? Does the title still display if the image can't be displayed ? Is the title then read by screen readers ? StuRat (talk) 05:23, 25 January 2015 (UTC)
- The title attribute isn't processed by screen readers at all. The most popular Web browsers (IE, FF, Chrome, and Safari) just render it as a tool tip. If no alt text is defined and the image doesn't display, the user will typically see a little box indicating a missing image, although some browsers will just render the missing image as a blank space.—Best Dog Ever (talk) 06:27, 25 January 2015 (UTC)
- In that case, I suppose the best practice is to define the same text as both the title and alt text ? StuRat (talk) 06:30, 25 January 2015 (UTC)
- Yes. I would.—Best Dog Ever (talk) 06:35, 25 January 2015 (UTC)
- OK, will do. Thanks for your help. StuRat (talk) 06:56, 25 January 2015 (UTC)
- No problem.—Best Dog Ever (talk) 07:05, 25 January 2015 (UTC)
The above seems a rather poor example of alternative text (and also probably poor web design, particularly for a university). I couldn't work out where the above images occurs, but the alternative text is supposed to describe the image so unless the image is simply an image of a link to Strayer University, it isn't doing the intended job. In case where the image is purely decorative, it may be better to simply define alt as null. Wikipedia:Alternative text for images has some examples, but it's written from the POV of wikipedia so there are some cases in the real world which probably aren't really discussed, still it's a useful starting point including for links for more info. Making alt and title the same may be okay in some cases, but probably a poor idea in others. To be honest, I'm not sure if there's ever a good reason for the alternative text to be "this is a link to Strayer University", it sounds to me like as I suggested above, this is more an example of poor web design than anything else and likely to be a source of unnecessary confusion, particularly for screen readers. Nil Einne (talk) 13:17, 25 January 2015 (UTC)- Actually this does support the use of alt text in the manner described above for images used for navigation elements [1] so I guess that's considered okay by some experts. I'm still not sure if that's the best webdesign in most cases however and can't help thinking if the reason it isn't mentioned at Wikipedia:Alternative text for images is not simply because it's something that isn't likely to occur on wikipedia, but also because it's something best avoided. BTW using the IE7 and earlier tooltip behaviour which is also mentioned in our article alt attribute, is something most guides I saw recommend against because it means that screen readers and other software using the alt text for the intended purpose may be disadvantaged. Nil Einne (talk) 13:33, 25 January 2015 (UTC)
- P.S. [2] has some more discussion. In particular, there's a general recommendation against using the title element for anything perhaps besides a tooltip. And even a tooltip should be used with care, it definitely shouldn't be that important since touch devices frequently don't have an easy way to access it. Probably it's annoying for those who largely navigate by keyboard too. (I would add people like my mother would have difficulty figuring out how to get the tooltip, or even that it may exist, even with a mouse.) BTW, from what I understand, in the absence of an alt attribute, some screen readers will read the title or have an option to read the title, but many don't by default so using the alt attribute correctly is what should be done where it's needed. I think reading out the filename is the more common fallback. Also I said in the struck out portion that alt text should describe the images. The is wrong, the correct terminology is the alt text should convey the content and function of the image as said in the Wikipedia guide (which I only quickly perused agains). I sort of knew this, but reading [3] made me realise/remember why it's important to make the distinction. Incidentally, because of the above and [4], I think possibily if you want to hide the image, you should not only give a null alt (has to be null, not simply absent) but also no title (or a null title). Nil Einne (talk) 13:48, 25 January 2015 (UTC)
- Actually this does support the use of alt text in the manner described above for images used for navigation elements [1] so I guess that's considered okay by some experts. I'm still not sure if that's the best webdesign in most cases however and can't help thinking if the reason it isn't mentioned at Wikipedia:Alternative text for images is not simply because it's something that isn't likely to occur on wikipedia, but also because it's something best avoided. BTW using the IE7 and earlier tooltip behaviour which is also mentioned in our article alt attribute, is something most guides I saw recommend against because it means that screen readers and other software using the alt text for the intended purpose may be disadvantaged. Nil Einne (talk) 13:33, 25 January 2015 (UTC)
- 1) That example was just a practice case to work out the difference between the "alt" and "title" keywords. That was an image I happened to have handy, I'd presumably find one more appropriate for a real web page.
- 2) If I didn't want an image to display, I wouldn't put one in, hence no image keywords either.
- 3) A simple example of describing the image versus what the image will do is an up arrow, which I wouldn't describe as "Up arrow", but rather "Return to main page".
- 4) I think I will use both "title" and "alt", with identical captions, since I want browsers to display the title, say as a tooltip, if they can, and I also want to display text if the image isn't shown, and have screen readers read the title. StuRat (talk) 14:33, 25 January 2015 (UTC)
Ersatz "dual boot" option
[edit]I'm using XP, normally booting up from a SATA drive, and would occasionally prefer to boot up from an older PATA drive. What I've been doing is (with power off) attaching the older drive when I wanted to use it, and hitting "esc" for the boot choice. I don't normally leave the PATA drive on when I don't expect to use it for a while, as it's added wear for an older drive, as well as using unnecessary power.
I'm a bit concerned about the wear and tear on the PATA cable and connector, so was wondering if it's possible to leave that cable connected, and connect the power to that drive only when I wanted to use the PATA drive (prior to turning on the computer). In other words, most of the time, the PATA drive would be connected to the computer, but it would be unpowered. Might this damage either the drive or computer? Bunthorne (talk) 18:45, 25 January 2015 (UTC)
- There should be no issue. With no power, nothing is active. -- Gadget850 talk 20:46, 25 January 2015 (UTC)
- I agree it won't damage anything but IIRC from experience back when PATA was way more common, that may cause delays in POSTing (or when detecting IDE drives in BIOS). I presume the interface detects something unusual and takes a while to be certain there's no working drive connected. Nil Einne (talk) 12:10, 26 January 2015 (UTC)
How to return an HTML page to using a CSS file ?
[edit]I have an HTML file that uses a Cascading Style Sheet, referenced as such:
<link rel="stylesheet" href="mystyle.css">
Later in the HTML page I override the font and color defined in that CSS file with:
<font face="ariel" color="red">
I then want to return to using the CSS file for the rest of the HTML page. I tried:
<font face="null" color="null">
That seemed to return me to the default font and color for HTML, not those defined in the CSS file. What should I do differently ? StuRat (talk) 20:26, 25 January 2015 (UTC)
- Try using CSS:
<span style="font-family: Arial,Helvetica Neue,Helvetica,sans-serif; color: red;">...</span>
- -- Gadget850 talk 20:43, 25 January 2015 (UTC)
- I don't think you understand the problem. I am using CSS, to define some other color and font at the start of the HTML page. I then want to switch to red Ariel font for part of the HTML page, and then return to using the values defined on the CSS page. StuRat (talk) 21:05, 25 January 2015 (UTC)
- Then my best guess is that you are not closing with
</font>
. -- Gadget850 talk 21:07, 25 January 2015 (UTC)
- Then my best guess is that you are not closing with
- Sorry, I just misunderstood your earlier comment. I thought you were saying to change my external CSS page to red and Ariel, but you were saying to use an inline CSS style to override the external CSS page. I tried it, and it works. Thanks ! StuRat (talk) 21:12, 25 January 2015 (UTC)
Finding your network's DHCP range if you don't have a Default Gateway IP?
[edit]I'm following these instructions because my printer won't stop cycling IP addresses and it sounds like this will fix it. But the thing that worries me is "Note: If you manually set the printer's IP, make sure that it is outside of your router's DHCP range. Otherwise you may run into an issue with duplicate IP's on your network." So I followed these instructions planning to then follow this video but when I typed ipconfig/all into console the Default Gateway was blank. Does this mean I just don't have a network? If so, can I set the printer's IP manually without risk of duplicate IPs? 50.54.55.153 (talk) 20:44, 25 January 2015 (UTC)
- Is DHCP enabled? -- Gadget850 talk 21:10, 25 January 2015 (UTC)
- I tried to follow these instructions for finding out, but when I typed my address ending in 0 I just got "This page cannot be displayed". 50.54.55.153 (talk) 21:56, 25 January 2015 (UTC)
- When you do ipconfig/all one of the entries will be
DHCP Enabled
: what is it set to? -- Gadget850 talk 22:17, 25 January 2015 (UTC) - It appears DHCP is not enabled. Would that mean my original problem with the printer is not due to the IP address roaming? 50.54.55.153 (talk) 22:39, 25 January 2015 (UTC)
- What is your router brand/model? Do you know the IP address? -- Gadget850 talk 22:44, 25 January 2015 (UTC)
- When you do ipconfig/all one of the entries will be