nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

Control spacing before separator #1493

Open simonleadbetter opened 4 months ago

simonleadbetter commented 4 months ago

For improved a11y, we prefer to use a comma as a separator than the default | pipe character as screen readers will read vertical line, but they will ignore punctuation like a comma.

We change the default separator using the separatorChar config override; however, this leaves a space between the title and the comma. It would be great if the value of the separator honoured spacing, i.e: ', ' rather than it be programatically added.

khalwat commented 4 months ago

Well, it's a separator character, not a string. I'm assuming this is mostly a cosmetic issue, in that it displays a little weird visually when you're using a comma?

I guess I could special-case it and remove the space if the character happens to be a comma, but it feels odd.

simonleadbetter commented 4 months ago

Hi Andrew. Yup. A client spotted the space and requested its removal. Ideally we would prefer to keep the comma as it creates a better experience for screen readers, so if you could tweak the rendering that that would be great.