Provide better ALT Names on images.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Provide better ALT Names on images.

Post by Dragosvr92 »

@sooskriszta, No..... My point is that the images on phpbb3 already have a alt, but it loads a text.
They should make it load the name of the image betwen the img tags.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
sooskriszta
Registered User
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: Provide better ALT Names on images.

Post by sooskriszta »

I understand what you are saying. In backend, alt is already happening.

/a3 mentioned that adding alt tags to bbcode may break existing bbcodes. I am saying, they don't have to, since the url bbcode already works the way we want the img bbcode to work.

Also, in addition to alt tag (your suggestion), I am saying that (once your suggestion is implemented), the alt tag should also be copied over for title tag (tooltips)
OC2PS
Testfestés, Arcfestés, Csillámfestés

Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Provide better ALT Names on images.

Post by Dragosvr92 »

sooskriszta wrote:Also, I would suggest that the alt text be duplicated into title text as well for tooltips.
Thats not needed. The titles are sometimes disturbing.
If the user wants the name of the image into the title, he can just copy the output from the alt to the title.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
sooskriszta
Registered User
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: Provide better ALT Names on images.

Post by sooskriszta »

Just to make sure we are talking about the same thing, when I say title tag, I am referring to the title="" within img, e.g.

Code: Select all

<img src="http://area51.phpbb.com/images/area51.png" alt="Area51 logo" title="Area51 logo" />
Alt is what you see in the placeholder before the image has loaded.
Title is what you see in tooltips (small box at bottom right of mouse arrow pointer) when you hover on the image (or placeholder)
OC2PS
Testfestés, Arcfestés, Csillámfestés

Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Provide better ALT Names on images.

Post by Dragosvr92 »

Yes i know what you meant from the start.
My point still stands. I think the title tag is not needed, and a bit annoying in some cases.
As long as the alt is generated you can add the title tag yourself, but copying the string inside the title.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

/a3
Registered User
Posts: 97
Joined: Mon Sep 20, 2010 6:44 am

Re: Provide better ALT Names on images.

Post by /a3 »

sooskriszta wrote:

Code: Select all

[url=http://www.phpbb.com/]Visit phpBB![/url]
[url]http://www.phpbb.com/[/url]
are allowed.

Can't the same be done for img without breaking anything?
Yes, that would be better. The only (small) downside is that special characters (eg. "]") would break it, which is why having the ALT description inside the tag may be slightly better (eg. [img=URL]ALT[/img])

This could be fixed by having quotes, similar to the quote tag - see example:
[u]Special characters in here - []()*[/u] wrote:Test

Code: Select all

[quote="[u]Special characters![]()*[/u]"]Test[/quote]
However, quotes wouldn't be allowed ("") since it is inside quotes.

But then we don't want to break things either.

My suggestion for phpBB 3.2 is either have:
  1. Have something in the update process to phpBB 3.2 which changes the BBCodes so that the URL is in the image, eg. [img=URL]ALT[/img], but might cause some confusion for users of other bulletin boards, or
  2. Use [img=ALT]URL[/img] which would not break anything, since [img]URL[/img] would still be allowed, but with minor disadvantages (see above).
Both of these would be better than the current system, which is having no alt text at all.
$ git commit -m "YOLO"

User avatar
sooskriszta
Registered User
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: Provide better ALT Names on images.

Post by sooskriszta »

/a3 wrote:
sooskriszta wrote:

Code: Select all

[url=http://www.phpbb.com/]Visit phpBB![/url]
[url]http://www.phpbb.com/[/url]
are allowed.

Can't the same be done for img without breaking anything?
Yes, that would be better. The only (small) downside is that special characters (eg. "]") would break it, which is why having the ALT description inside the tag may be slightly better (eg. [img=URL]ALT[/img])
Not quite sure what you are saying....the url bbcode seems to be the correct model for what you are suggesting as well....

Code: Select all

[url=http://www.phpbb.com/]Visit phpBB![/url]
[url]http://www.phpbb.com/[/url]
So, basically if we replicate this for images

Code: Select all

[img=http://www.phpbb.com/]Visit phpBB![/img]
[img]http://www.phpbb.com/[/img]
The latter of the 2 types of img already exists, and since both types exist for url, i don't see any reason why both can't exist for img...meaning it should be possible to add

Code: Select all

[img=http://www.phpbb.com/]Visit phpBB![/img]
without breaking anything
OC2PS
Testfestés, Arcfestés, Csillámfestés

Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta

/a3
Registered User
Posts: 97
Joined: Mon Sep 20, 2010 6:44 am

Re: Provide better ALT Names on images.

Post by /a3 »

Yes, true, that's a #3, and probably better.
$ git commit -m "YOLO"

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Provide better ALT Names on images.

Post by Dragosvr92 »

We Dont need a new BBCode. We can use the existing one and use the image name as alt. Its just PHP.....
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Provide better ALT Names on images.

Post by Dragosvr92 »

So.. Where are we with this?
Please go back on the first page and read what i and Arty have talked about.
/a3 was just talking nonsense. There is absolutly no need to change the image bbcode. No offense.
When the topic page loads with the images, it reads the images and from their name it sets the alt. Or whatever way you might want to set, maybe set some new table with alt names for all images.... idk :!:
Previous user: TheKiller
Avatar on Memberlist 1.0.3

Post Reply