ScottLogic / prompt-injection

Application which investigates defensive measures against prompt injection attacks on an LLM, with a focus on the exposure of external tools.
MIT License
16 stars 11 forks source link

722 visual focus states improvement #724

Closed dhinrichs-scottlogic closed 9 months ago

dhinrichs-scottlogic commented 10 months ago

Description

Added focus styles to all interactive elements. For most it's the accent-border-colour, some additionally have a white border so that the focus is easier to spot. Outline is offset inwards or outwards for some elements to make it easier to see.

Screenshots

A few button examples with the new focus, check out the branch for a full view of all focus outlines. image

Checklist

Have you done the following?

gsproston-scottlogic commented 10 months ago

Looking good! I'm wondering if we need a different style for the outline on the 'x' on some of the modals. The colour is a bit similar to the background:

image

But then again these modal designs will change at some point, so might not be worth doing.

dhinrichs-scottlogic commented 10 months ago

Looking good! I'm wondering if we need a different style for the outline on the 'x' on some of the modals. The colour is a bit similar to the background:

image

But then again these modal designs will change at some point, so might not be worth doing.

That's a good point, and this is what I would suggest for an easy mid-term fix: Adding a white border on focus in addition to the turquoise outline: image

dhinrichs-scottlogic commented 10 months ago

I just discovered focus-visible, which is exactly like focus, but better! Learning something new every day! Will update that and make the requested changes

chriswilty commented 10 months ago

@dhinrichs-scottlogic Did you want a rounded border on the dialog outline?

image

If so, border-radius 0.625rem on the dialog will achieve that.

image