-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent creating <a>
without href
in header service name
#1826
Comments
I'd be quite happy to pick this up following on from #1825 if you know which way you want to go. I'd probably be inclined to go for the As for making |
@andymantell We've discussed this and we think that the most sensible thing to do is to hold this back until the next breaking release since we don't have evidence that it's causing users problems. We will then go with the default value of The alternative to output a But thanks for offering to work on this, it's much appreciated 🙌 |
Hello, we have some interesting edge cases where there is a need to provide a serviceName in the header without providing a serviceUrl to that service. Was there any rationale originally around forcing the serviceName to be hyperlinked? |
Thanks @matthewmascord - could you give us a little more detail about the use case you described, where there was no link? It will help us to understand what guidance we need to write, if any. |
Agreed in Team Triage that, as an MVP, we will swap out the a for a span if no URL is provided. |
Hello @timpaul, thanks for getting back. I think the main valid use case is where you have a page relating to a number of different services. You might want to include a generic service name to distinguish it from Gov.UK but not have a unique meaningful place to take users back to if they click the service name. |
As discussed in the v4 scoping session, we can avoid making this a breaking change by introducing a new class name that doesn't include the word |
What
As discussed in #1825,
serviceName
has an implicit dependency onserviceUrl
. IfserviceName
is set butserviceUrl
isn't, the macro renders an<a>
tag withouthref
.If
serviceName
is set, we could:serviceUrl
is set and if it's not, render a<span>
in place of<a>
OR have a default value/
forhref
Why
To help our users to avoid outputting invalid markup / miss including the href.
Who needs to know about this
Devs, Mark?
Done when
<a>
tag withouthref
for service name using the macroThe text was updated successfully, but these errors were encountered: