The leaf damage you describe may have several different causes. Please send me a photo if you can so I can take a closer look and assess what the issue is. However, I can offer you some advice without having seen the problem:
Essentially, there are three possible reasons for the damage.
The most likely cause is a leaf spot fungus that has spread over the leaves of the two plants. The most common reason for this is if the rosemary and thyme are kept in conditions that are too damp — i.e. in shady, poorly ventilated locations. The high level of moisture then facilitates the spread of the leaf infestation.
Remedy: Ensure your plants are placed in a bright and sunny location with good air circulation. I would recommend either moving your plants to another spot in the garden or rearranging the area they are already in, for example by cutting back the other plants around your herbs as necessary.
On the other hand, the problem might be caused by leaf mites, which pierce the surface of the leaf and suck out cells. The yellow patches then form where the mite has fed.
Remedy: I would also recommend relocating your plants in this case; however, if they are infested, the only real remedy to combat these piercing insects is insecticide. For spider mites, miticide will do the trick.
Finally, other piercing insects such as aphids can transfer viruses to the plant; this will also cause the leaves to develop patches. I think this is rather unlikely in your case, however.