The operative word translated "witness" is μάρτυς (martys) is one who gives testimony about what that person has seen, heard or experienced personally.
Thayer's lexicon for this word is given the appendix below.
In the case of Rev 11:3, the witnesses are testifying about Jesus in some sense. These two witnesses are called the following:
- They prophesy for 1260 days (v3)
- The above also means that they are prophets because they prophesy.
- They are also called two olive trees (V4; an allusion to Zech 3)
- They testify about and on behalf of Jesus ("my two witnesses", v3)
- They are also called two lampstands (see Rev 1:20, and Zech 3)
- They are able to devour enemies with fire (V5, see 2 Kings 1:9-12, Elijah)
- They have power to with hold rain (V6, see 1 Kings 18, Elijah)
- They have power to strike the earth with plagues (V6, Compare Ex 7-11, Moses)
All this means that these two witness give testimony, or testify about or on behalf of Jesus as per Rev 12:17, 17:6, 19:10.
APPENDIX - Thayer's listed meaning for μάρτυς (martys)
a. in a legal sense: Matthew 18:16; Matthew 26:65; Mark 14:63; Acts
6:13; Acts 7:58; 2 Corinthians 13:1; 1 Timothy 5:19; Hebrews 10:28.
b. in an historical sense: Acts 10:41; 1 Timothy 6:12; (2 Timothy
2:2); one who is a spectator of anything, e. g. of a contest, Hebrews
12:1; with a genitive of the object, Luke 24:48; Acts 1:22; Acts 2:32;
Acts 3:15; Acts 5:32 G L T Tr WH; Acts 10:39; Acts 26:16; 1 Peter 5:1;
with a genitive of the possessor 'one who testifies for one', Acts 1:8
L T Tr WH; ; with a genitive of the possessor and of the object, Acts
5:32 Rec.; μάρτυρα εἶναι τίνι, to be a witness for one, serve him by
testimony, Acts 1:8 R G; ; (Luke 11:48 T Tr WH). He is said to be a
witness, to whose attestation appeal is made; hence, the formulas
μάρτυς μου ἐστιν ὁ Θεός, Romans 1:9; Philippians 1:8; Θεός μάρτυς, 1
Thessalonians 2:5: μάρτυρα τόν Θεόν ἐπικαλοῦμαι, 2 Corinthians 1:23;
ὑμεῖς μάρτυρες καί ὁ Θεός, 1 Thessalonians 2:10; the faithful
interpreters of God's counsels are called God's witnesses: Revelation
11:3; Christ is reckoned among them, Revelation 1:5; Revelation 3:14.
c. in an ethical sense those are called μάρτυρες Ἰησοῦ, who after his
example have proved the strength and genuineness of their faith in
Christ by undergoing a violent death (cf B. D. American edition and
Dict. of Chris. Antiq. under the word ): Acts 22:20; Revelation 2:13;